Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jan 2003
    Location
    Berkeley, California, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    I have an extensive VBA program for Microsoft Word which I recently moved from Word 2000 to Word 2002. Now I can't bring it back into Word 2000, since I get a message: Cannot Open Macro Storage (runtime error 5981).

    I tried deleting Normal.dot, and re-installing vbe6.dll.
    Neither of these things worked.

    I also checked the Library references, and they seem to be in order.

    The message appears when I reference "ActiveDocument".

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    How did you move the macro? Opeing it under Word 2002 and saving there? Copying via the Organizer? Copying text? Exporting files?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    New Lounger
    Join Date
    Jan 2003
    Location
    Berkeley, California, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    I simply copied the template file from the Templates folder on one computer (running Office XP) to the Templates folder on the other computer (running Office 2000). I did the same thing hundreds of time without problems as long as both computers had Office 2000 (even though the former runs WIndows 98 and the latter runs WIndows 2000).

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    Cannot Open Macro Storage sometimes indicates that your template is attempting to reference a nonexistent (on the new system) global template or add-in, or maybe even a missing DLL. If you scan the Lounge for that phrase, you will find other examples of what can cause it.

  5. #5
    New Lounger
    Join Date
    Jan 2003
    Location
    Berkeley, California, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    I have found part of the solution to my problem (see my next post for the other part), but I'm not sure the best way to handle it.
    My Word Template references the Excel Object Library. When the template is running in Word 2002, VBA knows that it wants
    the Word 10.0 Object Library and the Excel 10.0 Object Library.
    When I move the template back to Word 2000, VBA knows to switch to the Word 9.0 Object Libary, but it doesn't know enough
    to switch back to the Excel 9.0 Object Library.
    By that time, it is too late to simply remove the reference to the non-existent Excel Object Library: VBA still balks (assuming I don't
    attempt to access any Excel functions). However, if I remove the Excel reference on the Word 2002 computer and THEN
    move the template over to the Word 2000 computer, I don't get a "Macro Storage" message.

    The question is: what is the graceful way to handle this, since I will be sharing my template with people using one or the other version of Word?
    It seems I would have to bundle an Excel dll file with my program. Not a very pretty solution. I don't even know if it's legal.

  6. #6
    New Lounger
    Join Date
    Jan 2003
    Location
    Berkeley, California, USA
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    The other problem I'm having attempting to transfer a Word 2002 template to Word 2000, is that
    my custom toolbars are not showing up. I don't know how to begin figuring out how to track this one down.
    Where are these toolbars stored?

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    Check to make sure your custom toolbars are stored in your template and not in your Normal.dot. If they're in the template, they should still be there on Word 2000, unless there's some incompatibility I don't know about... If you have to move/copy/migrate the toolbars from one template to another, search the Lounge on that, as the procedure is a bit involved.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 2002 Template won't open in Word 2000 (VBA Word 2002/2000)

    I have the strange sense that this has come up before, dynamically changing a reference at run time. Hopefully you can spot the thread in a few searches.

    Plan B is to use late binding. Declare xlApp As Object instead of Excel.Application, then use Set xlApp = CreateObject("Excel.Application") to instantiate the object, and if the user has Excel of some kind installed, the code works. Unfortunately, I believe you also have to recode all of your variable declarations that are library specific (e.g., Dim wks As Worksheet to Dim wks As Object) so this can be quite a bit of work to get it all running smoothly. There is supposed to be a performance penalty for late binding, but I'm not sure it's measurable in an interpreted application.

Posting Permissions

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