I have written a basic macro that shows the mailmerge toolbar. I have saved
it into the document that I wish to use it in, (not the global template).
I have created Macros in Access using the AutoExec name to allow them to run
on startup.
How can make my macro run on the startup of my particular document?
Thanks for your help in advance
Dan
If you created the macro in a document, if you call into autoopen it will
run when the document is opened. Better though to set up the macro in a
template and name the macro autonew, then when a new document is created
from the template, the macro will run. This avoids the security issues with
macros in documents.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I have written a basic macro that shows the mailmerge toolbar. I have saved
> it into the document that I wish to use it in, (not the global template).
[quoted text clipped - 8 lines]
>
> Dan
DanielWalters6 - 17 Dec 2005 14:27 GMT
I have chosen to name it AutoOpen, as I only want this macro to run when THIS
document is opened.
If I was to create another macro that removed it, would I be able to make
the macro run on close, eg. AutoClose? Does that work or is there another way
in which to deal with a closing macro?
Thank's for all of your previous help it worked a treat!
Dan

Signature
iPod's ROCK!
> If you created the macro in a document, if you call into autoopen it will
> run when the document is opened. Better though to set up the macro in a
[quoted text clipped - 14 lines]
> >
> > Dan
>I have written a basic macro that shows the mailmerge toolbar. I have saved
>it into the document that I wish to use it in, (not the global template).
[quoted text clipped - 7 lines]
>
>Dan
Name it AutoOpen.
Be aware that if your macro security level is set to Medium, you will
get a security warning each time because the macro is in the document
rather than in a template. If the level is set to High, the macro
won't run at all, and setting the level to Low is not recommended.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
DanielWalters6 - 17 Dec 2005 14:30 GMT
Brilliant it has worked. I am very happy with the Macro message coming up
each time :)
(I don't want it to be applyied to every new document , just this one, which
I work on quite a lot.)
Is there a way of making a macro run on close, possibly calling it AutoClose?
I have created a macro that removes the toolbar from sight, I was wondering
if I can remove the tool bar when I close the document.
Thankyou for your previous help, it's worked a treat!
Dan

Signature
iPod's ROCK!
> >I have written a basic macro that shows the mailmerge toolbar. I have saved
> >it into the document that I wish to use it in, (not the global template).
[quoted text clipped - 21 lines]
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
Charles Kenyon - 17 Dec 2005 16:39 GMT
http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> Brilliant it has worked. I am very happy with the Macro message coming up
> each time :)
[quoted text clipped - 42 lines]
>> Email cannot be acknowledged; please post all follow-ups to the
>> newsgroup so all may benefit.