General information
Category:
Coding, syntax & commands
Fernando,
Please ignore my previous reply, I was being a bit stupid! I have got the document to merge using the following code:
local loword,odocument,lowordmaindocument
loword=createobject("word.Application")
loword.visible=.T.
lowordmaindocument="c:\ipletters\5.doc"
odocument=loword.documents.Open (lowordmaindocument, 0, 0, 0)
odocument.MailMerge.Execute
which is fine because after the document has been merged the user sometimes wants to make amendments to the document before printing. This means that we cannot include the "close without asking for save as" otherwise this executes before the user has made the amendments to the document, unless you can think of a way to include this.
I also did not include the On Error to check is Word is running because if I did it didn't seem to fire up Word at all.
But thank you for your help - it's been invaluable!
Regards
Bob
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