Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initiating Word Mail Merge
Message
 
To
12/03/2001 10:20:38
Jim Harty
FL Dept Fin Services-Div of Rehab & Liq
Tallahassee, Florida, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00484036
Message ID:
00484126
Views:
11
Hi Jum;
Why don't you use OLE Automation instead ?
You can find a lot of sample code in the microsoft web site this is just one
example ":

http://support.microsoft.com/support/kb/articles/Q161/5/47.asp

Here you have a Little sample in Fox:

oWordRef = CreateObject('word.basic')
oWordRef.FileOpen('MyFile.doc') && Open a file
oWordRef.FileClose() && Close a file
oWordRef = CreateObject('word.basic')
nWordWindows = oWordRef.CountWindows()
? "Currently open windows:"
FOR j = 1 TO m.nWordWindows && lists all open windows
? oWordRef.WindowName(m.j)
ENDFOR
? "Active window:"
? oWordRef.WindowName(oWordRef.Window())
* activates first windowo
WordRef.Activate(oWordRef.WindowName(1))


Hope this help.




>From within VFP 6, how can i initiate Word, pass it the merge document, and get Word to initiate the mail merge function, using an excel file created from VFP.
> i have been able to initiate Word using DDEInitiate command, but cant get any further... could really use location of documentation on word macro's and how to call (params & such) from VFP, or examples to work with....
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Reply
Map
View

Click here to load this message in the networking platform