Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Prevent Word Document_Open from running

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Prevent Word Document_Open from running

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.


"Rich" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent code running Sandy Excel Programming 3 June 29th 08 06:11 AM
How to prevent vba code from running? kfng Excel Programming 3 November 17th 07 12:48 PM
How do I prevent unintentionally running a Macro? UA_Jeremy Excel Programming 1 September 8th 06 10:51 PM
Prevent others from running my macros Frederick Chow Excel Programming 2 December 13th 05 06:02 PM
How to prevent routine from running on certain sheets Gary Paris[_3_] Excel Programming 2 February 8th 05 03:28 PM


All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"