Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2004

Tip: Looking for answers? Try searching our database.

How to assign a name to Mailmerge document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TOM - 01 Apr 2004 23:38 GMT
I use the Execute method of the Mailnerge object and it
creates a new document called "Form Letters1".

This is a default name that Word creates.

How do I explicitly give the new word document a name?

I am not referring to the name of the original word doc
containing all the 'mergefields' but to the NEW document
that Word creates.

(hm, now what ambiguity will be found?)
Doug Robbins - Word MVP - 02 Apr 2004 03:06 GMT
I don't think it is possible to give the document a name as part of the
mailmerge process.  However, the new document does become the
activedocument, so you can include

ActiveDocument.SaveAs "[filename]"

which will give it a name, or, if you merely want a way of referring to the
document for further code execution, you can declare a variable as Document
and then use

Set mydoc = ActiveDocument.

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

>I use the Execute method of the Mailnerge object and it
> creates a new document called "Form Letters1".
[quoted text clipped - 8 lines]
>
> (hm, now what ambiguity will be found?)
TOM - 02 Apr 2004 04:18 GMT
OK the object of the exercise is to NOT prompt for saving
when a user CLOSES a new 'Form Letter' document.

I know the code for this if I know a document name and
where to put it (I think) but how do I do this without
risking losing document changes on closure for ALL other
docs.

I was hoping to name the appropriate docs as "xyz no
save" during the merge proces (somewhere in the merge
process) and then on closure search for 'no save' in the
name and execute the code.

>-----Original Message-----
>I don't think it is possible to give the document a name as part of the
[quoted text clipped - 23 lines]
>
>.
Doug Robbins - Word MVP - 02 Apr 2004 06:27 GMT
Instead of searching for "no save", search for "Form Letters"

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> OK the object of the exercise is to NOT prompt for saving
> when a user CLOSES a new 'Form Letter' document.
[quoted text clipped - 52 lines]
>>
>>.
TOM - 02 Apr 2004 06:51 GMT
Yes and I have done so but there may be a small danger
that it might bite me on the backside as it might be not
unique enough.

>-----Original Message-----
>Instead of searching for "no save", search for "Form Letters"
[quoted text clipped - 57 lines]
>
>.
Doug Robbins - Word MVP - 02 Apr 2004 07:42 GMT
If the purpose of the exercise was to execute the merge to the printer
without the Print dialog appearing, then execute it to a document, use
ActiveDocument.PrintOut and then ActiveDocument.Close wdDoNotSaveChanges.

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> Yes and I have done so but there may be a small danger
> that it might bite me on the backside as it might be not
[quoted text clipped - 80 lines]
>>
>>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.