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 / Menus and Toolbars / June 2004

Tip: Looking for answers? Try searching our database.

VB coding for running a macro upon opening template?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StargateFan - 11 Jun 2004 03:26 GMT
Can someone share the line of VB coding that would start a macro upon
template opening?  A downloadable example with this type of thing
incorporated would be better due to my VB newbiness, but I'll try with
just the coding.  I've not been able to find anything online.  But I
suspect that I'm not googling for the right term(s) as I don't know
what this type of thing is called in VB terms.

Thanks.
Suzanne S. Barnhill - 11 Jun 2004 05:59 GMT
If by "template opening" you mean upon creation of a new document based on
the template, you just need to name the macro AutoNew.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

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.


> Can someone share the line of VB coding that would start a macro upon
> template opening?  A downloadable example with this type of thing
[quoted text clipped - 4 lines]
>
> Thanks.
StargateFan - 11 Jun 2004 09:53 GMT
>If by "template opening" you mean upon creation of a new document based on
>the template, you just need to name the macro AutoNew.

Well, d'uh!  <lol>  I did research and looked on the net and I found a
reference to AutoNew, but they didn't say this in so many words so I
was left without a clue on how to do this.  <g>

Thanks, that sure was an easy one!
Suzanne S. Barnhill - 11 Jun 2004 13:42 GMT
Word's Auto macros aren't terribly well documented, but here's a quick
rundown:

AutoExec: runs on starting the application
AutoOpen: runs on opening a document or template
AutoNew: runs on creating a new document from a template
AutoClose: runs on closing a document or template
AutoExit: runs on quitting the application

For further documentation, see "WD2000: Auto Macros in Word" at
http://support.microsoft.com/?kbid=211659

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

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.


> >If by "template opening" you mean upon creation of a new document based on
> >the template, you just need to name the macro AutoNew.
[quoted text clipped - 4 lines]
>
> Thanks, that sure was an easy one!
StargateFan - 12 Jun 2004 15:36 GMT
>Word's Auto macros aren't terribly well documented, but here's a quick
>rundown:
[quoted text clipped - 7 lines]
>For further documentation, see "WD2000: Auto Macros in Word" at
>http://support.microsoft.com/?kbid=211659

Awesome, thank you!  That saves a lot of leg work. <g>

>--
>Suzanne S. Barnhill
[quoted text clipped - 14 lines]
>>
>> Thanks, that sure was an easy one!
 
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.