Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Changing name of document merged
Hi.
Using Word2003, I do a mailmerge to a new Document, ActiveDocument.MailMerge.Destination = wdSendToNewDocument The property ActiveDocumentName is read-only, and I want to change the name of the document generated by Word (Letter1.doc) without using SaveAs or, if not possible, is there any way to change the name of document that Word autogenerates?. Best Regards, Janfry |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Changing name of document merged
Take a look at the code in the add-in that you can download from:
http://www.gmayor.com/individual_merge_letters.htm With a modification of that code, you could do what you want. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Janfry" wrote in message ... Hi. Using Word2003, I do a mailmerge to a new Document, ActiveDocument.MailMerge.Destination = wdSendToNewDocument The property ActiveDocumentName is read-only, and I want to change the name of the document generated by Word (Letter1.doc) without using SaveAs or, if not possible, is there any way to change the name of document that Word autogenerates?. Best Regards, Janfry |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Changing name of document merged
A document doesn't have a name until you save it? Letters(n) is just a
working title and not editable. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Janfry wrote: Hi. Using Word2003, I do a mailmerge to a new Document, ActiveDocument.MailMerge.Destination = wdSendToNewDocument The property ActiveDocumentName is read-only, and I want to change the name of the document generated by Word (Letter1.doc) without using SaveAs or, if not possible, is there any way to change the name of document that Word autogenerates?. Best Regards, Janfry |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Changing name of document merged
If you are trying to change the title that the User sees, try changing the
output document's .ActiveWindow.Caption property (typically, immediately post-merge, the new document is the ActiveDocument unless you have also produced an Error document) However, I think you will need to ensure that the caption is unique , in much the same way as Word does when it appends a sequence number. If you are trying to change the default name that Word will try to use when the user saves the document, try setting the output document's Title property to the name you want. However, you cannot just set ..BuiltInDocumentProperties("Title") because Word seems to throw away the value you assigned to the title (I think this is to do with the way that, by default, Word uses the first word or so in the document as the default file name). But it seems to work OK if you Exccute the dialog. e.g. something like Sub SetCaptionAndTitle() Dim dlgFSI As Word.Dialog ' assume the ActiveDocument is the OutputDocument ActiveDocument.ActiveWindow.Caption = "the caption you want" Set dlgFSI = ActiveDocument.Application.Dialogs(wdDialogFileSum maryInfo) With dlgFSI .Title = "the file name you want" .Execute End With Set dlgFSI = Nothing End Sub Peter Jamieson "Janfry" wrote in message ... Hi. Using Word2003, I do a mailmerge to a new Document, ActiveDocument.MailMerge.Destination = wdSendToNewDocument The property ActiveDocumentName is read-only, and I want to change the name of the document generated by Word (Letter1.doc) without using SaveAs or, if not possible, is there any way to change the name of document that Word autogenerates?. Best Regards, Janfry |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing From field in a mail merged word document | Mailmerge | |||
Unable to Find Merged Fields In Merged Document | Mailmerge | |||
Changing merged data after the merge | Microsoft Word Help | |||
merged labels - how do you save the merged document for use later | Mailmerge | |||
changing envelope size for a post-merged document | Mailmerge |