Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Janfry Janfry is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing From field in a mail merged word document Larry Mailmerge 1 June 21st 07 06:33 PM
Unable to Find Merged Fields In Merged Document Joe[_2_] Mailmerge 3 April 2nd 07 08:39 AM
Changing merged data after the merge Simvils Microsoft Word Help 1 March 20th 07 07:42 AM
merged labels - how do you save the merged document for use later DanaFox Mailmerge 1 November 1st 06 07:05 PM
changing envelope size for a post-merged document Ryan Proudfit Mailmerge 2 January 25th 06 06:46 AM


All times are GMT +1. The time now is 08:46 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"