Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Jul 2001
    Location
    Edison, New Jersey, USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail Merge into a Template? (Office 2000)

    I have an application the exports data into a WORD data file while activating WORD and opening the associated Mail Merge form letter. The problem I have is that some of my staff do saves of edit changes to the form letter. Our procedure is to Save As into another folder. I tried to make the form letter a template in order to force the Save As, but that did not work. Any ideas on how to prevent the Saves directly to the form letter (which wipes out half of the data that we use at other times).

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    .Make the template file Read Only
    .Have a "FileSave" macro which is empty (effectivelt disabling the FileSave" command and a FileSaveAs macro which does not allow the saving of the document; also include preventative code in the "Document_Close" event
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    BAM
    Guest

    Re: Mail Merge into a Template? (Office 2000)

    Hi Rob,

    Are the users creating a new document based on the template using File/New?

    If they are opening the template directly, then the template is being used like a document, rather than a template.
    ~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  4. #4
    Star Lounger
    Join Date
    Jul 2001
    Location
    Edison, New Jersey, USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    The other application has a field where I give it the path of the application to open (WORD.exe) and another field for the path to the document to be opened. So I end up opening the Template directly.

  5. #5
    Star Lounger
    Join Date
    Jul 2001
    Location
    Edison, New Jersey, USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    This seems like a good approach - except that much of this is new to me. I have changed the Save command to execute the SaveAs command. This is great for preventing the overwrite problems we had.

    I am now trying to get the SaveAs dialog box to point to the correct folder location for the save. I tried using a .Name option I found in another post but it has no effect. Can you point me in the right direction to do this?

    The final question is: I am also trying to get the filename (file saved as...) to be equal to a data item of a field passed in the mail merge data file. I am passing the filename used in the originating application and would like them to be the same.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    You can do both in this way:
    <pre>With Dialogs(wdDialogFileSaveAs)
    .Name = "C:/SuggestedDir/" & strSuggestedName & ".doc"
    .Show
    End With</pre>

    The help on using Dialog boxes can be found under "Displaying built-in Word dialog boxes" and "Built-in dialog box argument lists" (or in the Microsoft site here
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    Star Lounger
    Join Date
    Jul 2001
    Location
    Edison, New Jersey, USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    Thanks Geoff - (and others too - just that Geoff solution merged better with my thinking...)

    My mistake was in not understanding that the .show had to follow the .name. Of course new problems always come up and I am now trying to figure out why I am Locked out of my macros and why my VB Help does not permit me to enter keywords or any other text (like to the answer wizard). The cursor shows as the double horizontal arrow (like for adjusting a window border) - it will not become a text cursor when placed over text input fields! Too weird. No need to respond to these new problems (unless you have answers off the top of your head) because I have not yet done my own investigation - think I will start with re-installing the help feature...
    Thanks again - my 600 page book just didn't have the details I needed.

  8. #8
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Mail Merge into a Template? (Office 2000)

    You could put an AutoOpen macro into your template to force the creation of a new document (and close the template). I don't know how this would work with your application, though.
    Charles Kyle Kenyon
    Madison, Wisconsin

  9. #9
    Star Lounger
    Join Date
    Jul 2001
    Location
    Edison, New Jersey, USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge into a Template? (Office 2000)

    <P ID="edit"><FONT SIZE=-1>Edited by RobG on 16-Aug-01 12:15.</FONT></P>Final Post <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>: Thanks to you folks, I have the following macros in place. Save and SaveAs execute the same macro:

    With Dialogs(wdDialogFileSaveAs)
    .Name = "DocumentsShared DocsCommitment Letters" & ActiveDocument.MailMerge.DataSource.DataFields(1) & ".doc"
    .Show
    End With

    The file name that I want to use for the save happens to be the first field of the Merge Data file - hence the (1).
    Thanks again for all your help, ideas, and directions.
    <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Addendum: In the spirit of sharing solutions - We have multiple PC's connected in a WIN98 peer-to-peer network. The above solution worked from the main PC (the box with the server disk internal) but not from the other PC's in the network. Here is the final solution:

    With Dialogs(wdDialogFileSaveAs)
    .Name = "ServerS_DataDocumentsShared DocsCommitment Letters" & ActiveDocument.MailMerge.DataSource.DataFields(1) & ".doc"
    .Show
    End With

    Thanks again to those who helped.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •