Prevent Word Document_Open from running

R

Rich

When opening a Word doc from Excel VBA, I want to prevent the Document_Open
routine in the Word doc from automatically running.

Application.EnableEvents = False in Excel doesn't stop the Word macro from
running - and there seems to be no equivalent command in Word.

Putting wdDoc.UserControl = False/True in the Word macro doesn't seem to
make any difference - the macro still runs.

Any tips?
 
D

dmoney

This may be a long shot, but you if you know the sequence of keys to hold
down when opening word that prevents the code from running, you could try the
sendkeys command in excel VBA.
 

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