autostarting macro

W

wouter

Hello,

I made a template document (template.doc). This template
contains a macro wich must auto start.

When I open explorer and then double click on
template.dot, the template is opend and the macro starts.

When I open Word first, then open template.dot, the macro
is NOT started.

Is this by default ? Or did I do something the wrong way ?

Kind regards,

Wouter
 
B

Beth Melton

You didn't mention what you named the macro but if you named the macro
AutoOpen then it will fire when you open the template, such as using
File/Open to open the template.

I suspect you named it AutoNew, or you are using the Document_New
event located in the "ThisDocument" module of the template, since it
is firing when you double-click the template in an Exploring window.
The default action for double-clicking a template is to create a new
file based on the template.

Now, the nature of a template is to create new documents based on the
template rather than opening the template directly. So aside from
using the correct macro name - perhaps you can tell us more about what
you are trying to accomplish and we can help you determine the best
route to take. :)
--
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 

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