running macro automatically when doc is opened

R

reesey

I was told naming a macro "autonew" would make it run whenever the document is opened. I tried this --I created a macro named autonew to run a mail merge with an access query being my data source and it does not run when i open the document--is this not correct about naming it autonew?
 
G

Graham Mayor

Autonew runs when a new document is created
Rename it Autoopen

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
D

Doug Robbins - Word MVP

Save the mailmerge main document as a template into the User or Workgroup
templates folder and then use File>New and select the template rather than
File>Open.

If you did not get a macro security warning when you opened the document as
it now is, it would indicate that your macro security level is set to Low
which is NOT recommended.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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