Macro won't run

R

robbyp

I created an AutoOpen macro for a specific document. As I was creating it I
would manually run it in the document just fine. When I had what I wanted, I
saved the document and closed it. When I open it, I'm prompted to Enable
Macros, which I do, but then the macro does not run. If I try to run the
macro manually, again, nothing happens.

I am using Word 2003 on Win 2k. This is very frustrating since it was
working fine until I closed the document. I would appreciate any help. Thanks.
 
C

Cindy M.

Hi robby,
I created an AutoOpen macro for a specific document. As I was creating it I
would manually run it in the document just fine. When I had what I wanted, I
saved the document and closed it. When I open it, I'm prompted to Enable
Macros, which I do, but then the macro does not run. If I try to run the
macro manually, again, nothing happens.

I am using Word 2003 on Win 2k. This is very frustrating since it was
working fine until I closed the document.
Could you show us the macro, please?

Also, try selecting the content of the macro, then click the "Comment" button
in the macro editor to comment it out (so it won't execute). The create a
single line of code:
MsgBox "Hi, I'm an AutoOpen macro"

Will this run?

Are you able to create any macros in documents that run after you've closed,
then re-opened a document?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
A

alborg

You are going to have to manually change your Word security settings
("Tools-> Macros-> Security") to "Medium", get out then when you reopen your
document it'll ask you if you wish to run the macro.

Cheers,
Al
 
R

robbyp

My macro security settings are already at Medium. When I open the document it
prompts me to Disable or Enable macros. I click Enable and then the macro
doesn't run even though it's called AutoOpen. I was able to run this macro
while I created it, but once I saved the document, closed it, and then opened
it it will no longer run.

I am able to successfully run an AutoOpen macro for a basic message box. I
would post the code for you, but I am unable to get to it. When I go to the
macro box and click edit, run, step into etc... it just closes the dialog box
and never shows me the macro.
 
A

alborg

Hi rob:

Ok, then try to set the security settings at "low" (that's what I do, BTW).
Security is important, but sometimes Microsoft kind of overdoes it.

If it doesn't work, then follow my instructions on how to place your VBA
code in the correct place that I posted last night, located here-

"Run a macro automatically when you create a new document", 1/10/2009, URL
http://www.microsoft.com/office/com...0713&mid=384b40d4-327d-4077-b230-54c3dc895ad1

I'm not sure what you are doing, but to get to the VB Editor platform in
word, you need to click on the VBE toolbar clickbutton, and if you click on
your document you should be able to see a treeview of your modules (i.e.
where the macros reside), UserForms, etc with all of the underlying code
available which should not disappear until you close it manually. You can
cut/paste your code from there.

As Cindy stated, we need the code!!

Al
 

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