Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word - Automatically merge data and show merged result
Message
From
20/06/2003 12:22:06
 
 
To
20/06/2003 09:31:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00801933
Message ID:
00802270
Views:
35
>This looks good, but I am trying to quickly piece out only the part I want. It looks like this creates the new doc, links the source, prints, etc. As stated before, the document (form) is already in a destination that VFP will know as predetermined, and the source is already linked to it, and I am using the run command to pull the document up with word and the link is automatic. I simply want to send the command to perform the merge (simulate the user pressing the merge button on the toolbar in word). I may be able to piece this step out of what you sent me, but if you could send me a limited version doing just what I want to in the meantime, that would be geat.
>
>Thanks


oWord = createobject('Word.Application')
Oword.Documents.Open('KnownMailMerge.doc')
with oWord.ActiveDocument.Mailmerge
.Destination = wdSendToNewDocument
.Execute
endwith
Cetin
Çetin Basöz
MS Foxpro MVP, MCP
Welcome to FoxyClasses
Türkçe bir Foxpro sitesi Fox4um

What should I put in the part (wdSendToNewDocument) becasue if I put it as it is, I get an variable wdSendToNewDocument does not exist. If I comment the line, it works, but with errors and only sometimes. What I would like to do is actually not save the new merged document but pull it up long enough for them to print or save it if they want to, actually, once the merged document is created, I plan to close the original form leaving up only the merged document to print or save. Can you explain what the wdSendToNewDocument part is for and the syntax for it?

Thanks
``` Appreciate a normal day, it is always better than a bad one ```

Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform