-
Feb 19th, 2015, 07:31 AM
#1
Thread Starter
Hyperactive Member
Could not open macro storage
I have a VB application where I create a new Word document and write to it.
It has been working OK but one user is getting the following error when using it on a new computer with Word97 & Window7
"Could not open macro storage".
I do this get this error on my computer.
The code I'm using to create the new document is
Dim NewDoc As Word.Document
Public MyWord As Object
MyWord = CreateObject("Word.application")
NewDoc = MyWord.Documents.Add()
Searching for answers it suggests permissions and the template file - but it is not using a template it is creating the document from scratch.
Thanks for any help.
-
Feb 19th, 2015, 03:14 PM
#2
Re: Could not open macro storage
but it is not using a template
of course it is, if no template is supplied as a argument, then normal.dot is used as default
as you are creating the word object using late binding, do you have a reference set to Word97?
did the computer come with office trialware preinstalled?
did you fully uninstall before installing 97?
i have not tired any code using 97 on any OS after XP, and can not test now
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 19th, 2015, 07:24 PM
#3
Re: Could not open macro storage
In addition to what Pete has stated, the Word VBA project also maintains a reference to Normal.Dot.
From: How to check and remove incorrect project references in the Visual Basic Editor in Word
In the Microsoft Word Visual Basic Editor, you can create references to object libraries or code in an external document or template. This allows you to call external procedures as if they were written in your own project. Note that problems can occur if the referenced files are moved or become corrupted. Macro storage errors can occur, and the References dialog box can become inaccessible.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|