ID: Q117399
The information in this article applies to:
The "Microsoft Word Developer's Kit, First Edition" incorrectly states on page 339 that:
"You can use the following command line to disable all
auto macros, including AutoExec:
winword.exe /mDisableAutoMacros"
This above incorrect information also appears in WordBasic Help.
When executed from the command line, the DisableAutoMacros instruction disables ONLY the AutoExec macro but does not disable the AutoNew, AutoOpen, AutoClose, or AutoExit macros.
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
To disable all auto macros for the current session of Word, the DisableAutoMacros command must be issued from inside a macro. Use the following macro to accomplish this:
Sub Main
DisableAutoMacros
End Sub
If you name this macro "DisableAuto" (without the quotation marks), you can
use the command line "WINWORD.EXE /mDisableAuto" (without the quotation
marks) to disable all auto macros, including the AutoExec macro, for the
entire Word session.
To modify the command line, in Program Manager, select the Word for Windows icon. From the File menu, choose Properties. Make your changes to the command line and choose OK.
For additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q70991
TITLE : Auto Macros in Word
"Microsoft Word Developer's Kit," version 6.0, page 339
Kbcategory: kbusage kbmacro KBSubcategory: Additional reference words: 6.0 6.0a 6.0c disableautomacros automatic macros autonew autoopen autoclose autoexit autoexec doesn't docerr doc err word6 documentation error wdk winword
Version : 6.0 6.0a 6.0c
Platform : WINDOWS
Last Reviewed: August 4, 1997