Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Initiating Word Mail Merge
Message
 
À
12/03/2001 10:20:38
Jim Harty
FL Dept Fin Services-Div of Rehab & Liq
Tallahassee, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00484036
Message ID:
00484126
Vues:
10
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform