Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automating Word from FoxPro 5.0
Message
From
04/03/1998 05:33:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/03/1998 13:03:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00082333
Message ID:
00082433
Views:
25
>Does anyone have information on how to automate Word 95 or 97 through VFP? I know I can use CREATEOBJECT("Word.Document") or "Word.Application", but that's about it. The documentation seems to be poor, unless I'm looking in the wrong place. I would be grateful to anyone who could point me in the right direction

Gino, there are three examples in KB\FAQ\Win32API section (one was added later), "Interacting Word using word basic". Those examples all refer to word 95 and word.basic (I didn't have W97 by date posted). In word 97 some commands changed behaviour, but except "editgoto(Bookmark)" all commands in the example work with w97 too. "editgoto(Bookmark)" fail but "editbookmark(Bookmark,,,,1)" as stated in example. You can still use word.basic in w97 :
oW97 = createobject("word.basic")  && Creates a word.basic obj works in w95 and w97
* Above is equal to
oW97App = createobject("word.application")  && Only w97
with oW97App.wordbasic                      && Equivalant of createobj("word.basic")
* W97 obj comp model
* Application
*  +---Wordbasic
Another tip (undocumented in KB) to get complex word commands in correct syntax : Run word and record macro, then edit macro to see VFP calling syntax.
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