AutoOpen Macros

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

I received a suggestion from Mr Kenyon to create an "AutoOpen" macros to
update link fields automatically. It seems that whatever file I open will
run the macros. How do I set the macros to run only for that specific file?

Thank in advance
Richard
 
Save the macro in that document instead of in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Hi Suzanne

Thanks for taking time to answer. I cut out the code from the modules and
pasted onto to the "ThisDocument" object. Now I get the following message
when I open the file:
 
Hi Suzanne

The security was set to high so the message. But I am wondering how come the
alert wasn't shown when the macros was at the module.

Thanks again
Richard
 
If you mean why did the macro run without complaint when it was in the
template, it's because the usual security setting is to "trust templates and
add-ins". Note that this applies only when they are correctly stored in the
template folders - if the .dot files are stored elsewhere you'll still get
warning messages or automatic disabled macros.
 
Back
Top