All,
Need to find a way how to save the merged file.
I have already executed the merge with the following 2 statements...
Object oFalse = false;
wrdMailMerge.Destination =
Word.WdMailMergeDestination.wdSendToNewDocument;
wrdMailMerge.Execute(ref oFalse);
At this point in time, I have the merged document open in Word. I
think Word has already named the file according to its naming
conventions...
Now, I need to save the merged file in a specific location and with a
specific name.
Any help will be greatly appreciated. I am writing this in C#.
Thank you,
Gavin.
Peter Jamieson - 08 Mar 2004 18:08 GMT
After the merge to a new document, the newly created document should be the
ActiveDocument;whatever the parent object of your wrdMailMerge object should
point to the Mail Merge Main Document which you should be able to close and
discard. This may be complicated a little if there is an Error document.

Signature
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/
> All,
>
[quoted text clipped - 18 lines]
>
> Gavin.
Curtis Justus - 08 Mar 2004 22:10 GMT
Hi,
One way you can do it is to handle the MailMergeAfterMerge event. One of
the arguments is the resulting document. You can then do a .SaveAs on that
document and close it when you are done.
I hope this helps,
cj
> All,
>
[quoted text clipped - 18 lines]
>
> Gavin.
Gavin - 09 Mar 2004 15:36 GMT
Thanks a lot for your help. I did the save as and it worked fine.
> Hi,
>
[quoted text clipped - 27 lines]
> >
> > Gavin.