Problem runnig macros

N

Newuser

I have created a template on my home computer that has macros in it (I use
word 2002). I am trying to save that template on my office computer and also
share it with my friends. I save the template in the TEMPLATES forlder
however when I try to run the macro it says runtime error 5891 could not open
macro storage. When I
try to debug the macro it says error in loading DLL.
I have set my office macro security to medium.
What can I do?
Please Note: This question was initially posted in the general questions
section. I have reposted it here. Please only reply to this posting.
 
F

fumei via OfficeKB.com

Could you describe the situation in more detail? Are you getting this when
you try and run code from a document cloned from the template?
 
N

NZ VBA Developer

Could also depend on other add-ins installed on the work computer. Please
include this info in your "additional problem description" post.
 
S

Shauna Kelly

5891

You sure that isn't 5981?

Anyway, create a new document from your template (so you see the error).
Then, in the Visual Basic Editor, do Tools > References.

Is there anything near the top of the list that says the Reference is
broken? If necessary, use the Project Explorer to click on each open project
in turn and check each one for broken references.

If so, this is probably the cause of the problem.

It means that the setup on your machine at home and the one at work isn't
the same and there's something you have referenced in your .dot that you
have on your home machine but you do not have on your work machine. You have
Word 2002 at home. Are you perhaps using an earlier version of Word at work?
Or does your template reference another Office application (such as Excel)?
If that's the case, you'll need to create a refererence to the earlier
version of (say) Excel - and you'll need to test out your macros to see if
they work with the older object model.

Try to fix the broken reference. If it doesn't work, post back and let us
know more.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
N

Newuser

My office has word 10.0.

When I load a cloned document or open the template in my work-place Word
program under references in VBE the following is missing: MISSING: Microsoft
word 10.0 object library.

Now if I open a blank document on the same computer (not my template) and
check Tools>references, this reference is not missing.

I compared the list of references between my version and the office and it
seems they are both the same.

Thank you and to all those who are trying to help.
 
S

Shauna Kelly

Hi

Do File > Open to open your template. Alt-F11 to get to the VBE. Select your
template in the list in the Project Explorer on the left, open up a module
and then do Tools > References to see the reference list.

Un-tick the box that says it's a broken reference. Click OK. Word might
re-set the reference to itself correctly. So try to re-run the code.

If that doesn't work, open up Tools > References again, scroll down the list
and find and tick the "Microsoft Office 10.0 Object Library" option and see
if it works now.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top