AutoExit() won't execute

D

Dave Neve

Hi

Why won't this simple bit of code work.

I'm trying to understand 'automatic macros'.

It works if I execute it in VBA but not when I close the doc or Word.

Thanks

__________________________________________________

Sub AutoExit()

MsgBox "Have a Nice Day", _
vbOKOnly + vbExclamation, "Dave Neve"

End Sub

__________________________________________________
 
M

Martin Seelhofer

Hi Dave
Why won't this simple bit of code work.
I'm trying to understand 'automatic macros'.
It works if I execute it in VBA but not when I close the doc or Word.

AutoExec and AutoExit-Macros work only if saved in a global template
aka "Add-In" which is a template saved in Word's startup folder...


Cheers,
Martin
 
D

Dave Neve

Hi

Thought I understood but it doesn't work.

If I put the macro in .Normal ,ererything is ok.

But I have other .dot docs and if I put it in one of them, it doesn't
execute.

Finally , if I create a doc, add the macro and put it into the Word/StartUp
folder, nothing happens.

I feel that there is still sth I haven't grasped about the relationship
between .Normal and .dot

Can you help?


De: "Martin Seelhofer" <[email protected]>
Objet: Re: AutoExit() won't execute
Date: dimanche 17 octobre 2004 18:22

Hi Dave
Why won't this simple bit of code work.
I'm trying to understand 'automatic macros'.
It works if I execute it in VBA but not when I close the doc or Word.

AutoExec and AutoExit-Macros work only if saved in a global template
aka "Add-In" which is a template saved in Word's startup folder...


Cheers,
Martin
 

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