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 / General MS Word Questions / September 2004

Tip: Looking for answers? Try searching our database.

Macros running automatically from a template

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Preet - 06 Sep 2004 11:49 GMT
Hi

I have a template that will be opened from another application.
I have a macro in this template, and I wanted this to Automaticall
execute on opening of the template (the template is not saved in th
Add-in).

I dont know how I would do this, basically my application will ope
this template, then I wanted the macro attached to this template t
automatically start running as soon as the template is opened.

Please can anyone advise, I dont know VB, so any Sub AutoExec command
will need to be explained.

My current macro starts:

Sub Reqdata()

xxxxx

End Sub

After this I wouldnt know where to add the Sub AutoExec or the Publi
Sub AutoExec if needed?

Please can anyone help?

Sorry if this is a little confusing.

Thank you in advanc

--
Message posted from http://www.ExcelForum.com
TF - 07 Sep 2004 14:17 GMT
Name the macro AutoExec.

Signature

Terry Farrell - Word MVP
http://word.mvps.org/

: Hi
:
[quoted text clipped - 29 lines]
: ---
: Message posted from http://www.ExcelForum.com/
Suzanne S. Barnhill - 07 Sep 2004 14:38 GMT
No, name it AutoOpen if you really mean you're opening it; AutoNew if you're
creating a new document based on it. AutoExec will run every time Word is
started.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Name the macro AutoExec.
>
[quoted text clipped - 31 lines]
> : ---
> : Message posted from http://www.ExcelForum.com/
TF - 07 Sep 2004 17:50 GMT
Oops! Yes. I keep getting those reversed!

Terry

: No, name it AutoOpen if you really mean you're opening it; AutoNew if you're
: creating a new document based on it. AutoExec will run every time Word is
[quoted text clipped - 35 lines]
: > : ---
: > : Message posted from http://www.ExcelForum.com/
Preet - 10 Sep 2004 13:31 GMT
Thank you that worked! Thanx to you both!

--
Message posted from http://www.ExcelForum.com
 
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.