Tuesday, October 26, 2010

DisableAutoMacros

If you are running a macro that opens (or creates) several files, the last thing you may want is for an AutoOpen (or AutoNew) macro to fire up each time. WordBasic has a means of preventing this, which VBA never copied.

WordBasic.DisableAutoMacros 1 'Disables auto macros
WordBasic.DisableAutoMacros 0 'Enables auto macros

This command is also very useful when launching an instance of Word from another application, or from VB, when you will generally not want any AutoExec macros to fire

No comments: