Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Retrieve a Template FileName (WORD/VBA)

    I have a number of Word templates that when opened run a VB marco that presents the user with a dialog box that allows them to select the data file for a mail merge operation. At the completion of the mail merge I want to save the resulting word doc in a folder that uses the Word template filename as the folder name, the macro will supply the specific file name. For instance, if the template opened is 'Notice of Default.dot' i want to be able to save the finished merge document in C:Notice of Defaultfilename.dot
    My problem is that I cannot retrieve the template name. Activedocument.name gives me 'Document1' and not 'Notice of Default.dot'.

    Any ideas are appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Retrieve a Template FileName (WORD/VBA)

    Try Activedocument.AttachedTemplate

  3. #3
    New Lounger
    Join Date
    Jan 2002
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Retrieve a Template FileName (WORD/VBA)

    Worked like a charm. Thanks much.

Posting Permissions

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