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:26:37
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/06/2003 12:22:06
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00801933
Message ID:
00802274
Views:
40
>>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

Kevin,
Do not just check how long a code is but read it. wdSendToDocument is a constant with a value of 0 (see first reply #define)
Hope someone else can help more. I thought first reply already had all the code you need.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform