Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling a text object in word
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Controlling a text object in word
Divers
Thread ID:
00103148
Message ID:
00103148
Vues:
49
I can get the create & maintain a reference to a textbox on a word doc from VFP but cannot get change any property but the name. What I want to do is setup a form and use textboxes to fill in the info.

I know I can do this in Fox but I need it in Word for a reason.

Here's my code so far

* Start an instance of word
PUBLIC oWord,oDoc,oRange,oText

oWord = CreateObject("word.application")

* Add a new document based on a template
oDoc = oWord.Documents.Add("c:\program files\msoffice\templates\dcfs letterhead.dot")

* Add a Text box
* First we need a range for our
oRange = oDoc.Range(0,0)
oText = oDoc.FormFields.Add(oRange,70)

When I try oText.Value or oText.Text I get and unknown prop error.

Any ideas?
Paul G Brown, MCSD
Paul G Brown
paul@paulgbrown.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform