Doug :
Sorry , I mean :
oWord.ActiveDocument.MailMerge.Destination = 1 && to Printer
oWord.ActiveDocument.MailMerge.Execute(.f.)
(Bad Keyboard typeing)
The .Execute is what make it work.
TIP: Open Word , Record a new macro , and make what you want to do.
After that , edit the macro and with a few (very litle) translation, you will have almost all of your VFP code.
EXAMPLE of Word VB Code (in the Macro):
Selection.TypeText Text:="My text"
VFP Translation:
oWord.ActiveDocument.Selection.TypeText("My text")
VBA and VFP are not that diferent !
I'm trying myself to learn some VB to connect to Word , Excel and Outlook.
Good luck.
Pedro
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only