Macro that runs only once?

E

EllenM

Hello, I have a word document containing macros which run automatically when
I launch the document. Specifically, the macro displays a userform which
prompts the user to enter data that will go into the word file but saves a
copy of this word file with the changes. The original file is untouched. So
far so good.



Here is my dilemma: I do not want the macro to run each time I open the
copy of the original file. I found WordBasic.DisableAutoMacros at the
following link but do not know how or where to use it. Can I use this
command to disable auto-open macros from copies but keep the auto-open macros
enabled in the original file? Thanks.



http://word.mvps.org/FAQs/InterDev/DisableAutoMacros.htm

Thanks in advance for your help.

Ellen
 
J

Jay Freedman

You're misusing Word. The macro should be in a template, not a document, and
it should be named AutoNew. You should then use the File > Open dialog to
make new documents based on the template instead of re-opening the original
and saving as another file.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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