Autoexec does not seem to work any longer

D

dave.cuthill

I have used the instructions (on the attached link) to create a
application event procedure in the past for windowselection change and
it worked well to allow me to determine when I moved into and out of a
table. I have now been upgraded to Word 2003 and find that the
procedure does not work that same - specifically the autoexec. What do
I need to change to get this to continue to work?

http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm


David
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
I have used the instructions (on the attached link) to create a
application event procedure in the past for windowselection change and
it worked well to allow me to determine when I moved into and out of a
table. I have now been upgraded to Word 2003 and find that the
procedure does not work that same - specifically the autoexec. What do
I need to change to get this to continue to work?

http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm

What is the code you have in your AutoExec macro?
Do you have simply
Set oAppClass.oApp = Word.Application
but it does not fire?

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
D

dave.cuthill

Yes that is correct. If I run the autoexec after opening the file the
other code runs fine. At this point I think that I might abandon the
autoexec and find some other method of getting the Set oAppClass.oApp
= Word.Application to be executed (maybe a button or something).
 
D

dave.cuthill

I think maybe it makes more sense to call the autoexec from the
document_new or document_open in the thisdocument area. This seems to
work better over all. Maybe I am misusing the autoexec.
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
I think maybe it makes more sense to call the autoexec from the
document_new or document_open in the thisdocument area. This seems to
work better over all. Maybe I am misusing the autoexec.

AutoExec executes when Word is launched, not when a document is opened while
Word is already opened.
And, if Word is used in Outlook, and Outlook is already opened, depending on
the Office version, you will run into all kinds of problems.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.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