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
Doug Robbins - Word MVP - 11 Jul 2007 03:55 GMT
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.

Signature
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
> Hi.
>
[quoted text clipped - 10 lines]
>
> Janfry
Graham Mayor - 11 Jul 2007 07:43 GMT
A document doesn't have a name until you save it? Letters(n) is just a
working title and not editable.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Hi.
>
[quoted text clipped - 8 lines]
>
> Janfry
Peter Jamieson - 11 Jul 2007 11:23 GMT
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(wdDialogFileSummaryInfo)
With dlgFSI
.Title = "the file name you want"
.Execute
End With
Set dlgFSI = Nothing
End Sub
Peter Jamieson
> Hi.
>
[quoted text clipped - 10 lines]
>
> Janfry