Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling a text object in word
Message
From
29/05/1998 12:30:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00103148
Message ID:
00103156
Views:
18
>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?
Didn't try but wouldn't it be oText.TextBox.Value ?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform