Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Office Automation
Message
From
08/10/2003 13:11:25
 
 
To
08/10/2003 10:05:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00836175
Message ID:
00836329
Views:
10
>Cetin,
>
> That helped with my read only / file open thing, thanks a lot. I still have the problem with the template remaining open along with the merged document. How can I close the template document leaving up the merged one for editing, save, etc.?

In addition to the approach Cetin showed you, I prefer to use an object reference to the main document to close it. That is, when I create it I store an object reference to a variable. That way, I can use it to close that document:
oDoc = oWord.Documents.Add(<name of template>)
* Do what you need to, including the mail merge

* The merge result is always the active document
* right after the merge, so you can grab an object
* reference to it right away
oMergedDoc = oWord.ActiveDocument

* Now use the reference to the main doc to close it
oDoc.Close( wdDoNotSaveChanges)
Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform