Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling a text object in word
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Controlling a text object in word
Miscellaneous
Thread ID:
00103148
Message ID:
00103148
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform