Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 0 Times in 0 Posts

    Macros not Working in Template generated documents (2002)

    I have created a template, basically updated a previous, and it does not allow the operation of macros I have created to change styles or create/goto bookmarks. I get "run time error 5981". I have checked and set the macro security to low on both the template and the newly created document. The macros do not run from the VBA editor either. The only way I can get the macro to operate is to open the template as a template which is not really in the spirit of using a template. I have tried copying over the macros over to the document using the attach template organiser, however it is not permitting the use of this option (just wont copy - no error message). I tried to password protect the template previously to maintain configuration management when other users used the macro but removed this option because I thought it was creating the problem. Any suggestions before I go back two or three versions of the macro.

    Any time saving hints to resolve this problem will be greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 93 Times in 89 Posts

    Re: Macros not Working in Template generated documents (2002)

    Sometimes the code and especially the forms parts of templates and documents get corrupted. It might help to export, remove, then re-import all of the VBComponents (manually), including Forms, Modules and Class modules. Or even import them into a fresh document/template.

    If the error persists, can you post more details on what the code is trying to do at the time it occurs? My memory for run-time error numbers isn't so good anymore. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  3. #3
    Join Date
    Feb 2003
    Renfrewshire, Scotland
    Thanked 1 Time in 1 Post

    Re: Macros not Working in Template generated documents (2002)

    Don't know if this will help - I use Office 2000 and have hit similar problems with macros not being available. Make sure the template is available if it isn't - 'Tools' - Templates and Add-Ins...' from Word 2000

Posting Permissions

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