Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP & Word Automation Commands
Message
From
25/02/2003 07:06:15
 
 
To
24/02/2003 22:30:28
Dick Day
Madison County, Nebraska
Nebraska, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00757384
Message ID:
00757468
Views:
28
Hi Dick.

Can anyone tell me where to find the Word automation commands that can be used when creating an OLE control object in VFP? The MSN Office 2000 download document has great examples for VB but nothing for VFP. I don't know enough about OLE or VB to know how to translate the examples into usable VFP code.

In addition to what the others have told you, you can always use Word to record a macro and later edit it and translate the VBA code in the macro to VFP code by following these steps:

Suppose you have a line of VBA code that looks like this:

Selection.TypeText Text:= "yada yada yada"

1. Fully qualify the object. VBA assumes the application, but you have to add this for VFP so this becomes:

oWord.Selection.TypeText Text:= "yada yada yada"

2. Add parentheses:

oWord.Selection.TypeText( Text:=“yada yada yada” )

3. Remove named parameters:

oWord.Selection.TypeText( “yada yada yada” )

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform