Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    We are using Word XP. Most of our templates are currently stored under c:\Program Files in a folder that is not the specified default templates folder. As we prepare to go to Office 2007 and Windows 7, those same templates are to be stored under c:\Documents and Settings\All Users.

    This creates a problem. When a document that was created under the old folder structure is opened, the attached template is not found, and the associated toolbar is not available. I thought I could write some code that would fire at Document Open and read the name of the current path and temlate and use Replace to change the path to our new location. Unfortunately, when Word does not find the attached template, VBA reports that template as Normal.dot. (Even though Tool|Template & Addins displays the old attached template.)

    Is there a way for VBA to get the name of the original attached template so I can change it to our new location?

    Thanks,
    Richard Barrett

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

    Dialogs(wdDialogToolsTemplates).Template

    (Source: this post by Andrew Lockton)

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    That works well. Thank you to you and Andrew.

Posting Permissions

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