Results 1 to 2 of 2
  1. #1
    steveattmg
    Guest

    Word97 VBA Run-time errors (Word 97)

    I have created several Word97 templates that allow me to insert preformmated autotext entries.

    I have used these templates on numerous machines and never encountered the problem I have now. I'm on a Windows 2000 machine, and when I try to create a new doc, using the custom template, I get a run-time 5981 error "Cannot open macro storage" message. When I debug the error, VBA highlights the following line of code:

    ActiveDocument.AttachedTemplate.AutoTextEntries("I nsertPlainTextPage").Insert _ Where:=Selection.Range, RichText:=True

    I created in the template in Word97, and am trying to run on a different machine, using Word97. Could this be a virus checker issue?


    Help!!!


    Steve Reed <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>

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

    Re: Word97 VBA Run-time errors (Word 97)

    Steve,

    On this machine, does the error occur if you try to run any macro, or only this macro?

    When it's a general problem, it can be due to the user not having write access to temporary directories and/or registry keys which Word/VBA need to use. For more info, see:

    Q264743

    Q89247

    If the problem is occurring only on this particular line of code, that's hard to figure. Is there anything special in that autotext? (sounds like there isn't given its name<g>)

    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
  •