Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Harrisburg, Pennsylvania, USA
    Posts
    44
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Hello!
    We created several document generating macros and converted them to dotm files for our move to Office 2007. We're seeing now that the remaining reference to the original template in that newly created file is starting to cause issues elsewhere. So the code I want to add to the macro is fairly easy:

    With ActiveDocument
    .AttachedTemplate = "Normal.dotm"
    End With

    My issue is... WHERE can I put it? Adding the code to the cancel button & finish button keeps erroring off.
    Do any of you have suggestions?
    My thanks in advance,
    Melanie

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Melanie,

    Not completely clear from your post, why the newly-created documents should retain a reference to an older template (if you're using a new .dotm to create a new document), but in any case if you want to run code to change the attached template of a given document, the code will have to run from an add-in template that is available globally - for instance by putting it in users' Startup directory.

    Gary

Posting Permissions

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