Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2006

Tip: Looking for answers? Try searching our database.

How to execute macro when starting Word?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hstijnen - 29 Mar 2006 14:51 GMT
Hi,
I want to execute some code when starting Word. In a template this can be
done with AutNew() macro. But an AutoNew() macro in Normal.dot doesn't fire.
I've created a sub Document_New() in the ThisDocument module of Normal.dot
and this fires when I start a new blank document via File | New. But when I
start Word via Start button or toolbar it doesn't work.
What to do in the last situation?

Thanks for help
Regards,
Henk
Charles Kenyon - 29 Mar 2006 16:24 GMT
When you start Word, you want to use an AutoExec macro. This runs when Word
starts, but not every time new documents are created.
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.

> Hi,
> I want to execute some code when starting Word. In a template this can be
[quoted text clipped - 9 lines]
> Regards,
> Henk
Tony Jollans - 29 Mar 2006 18:01 GMT
Strictly speaking an AutoExec in Normal.dot runs when Normal.dot is loaded.
When Word starts up, this happens before the default new document is created
so it depends what you are trying to do whether or not it will be suitable.

The only event which fires at start up after the new document is created is
the Application DocumentChange event.

--
Enjoy,
Tony

> When you start Word, you want to use an AutoExec macro. This runs when Word
> starts, but not every time new documents are created.
[quoted text clipped - 25 lines]
> > Regards,
> > Henk
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.