The information in this article applies to:
SUMMARYWhen you write macros in Word, it may be necessary to test for the existence of a macro before running the macro with the WordBasic ToolsMacro statement. If your macro does not check for the existence of a macro, you may receive one of the following error messages:
MORE INFORMATIONWARNING: 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.The following WordBasic macro uses the IsExecuteOnly function to test for an existing macro named "Test" in the global template file, Normal.dot:
To test for the existence of a template-based macro, change the word
"Global:" to the name of the template in the above macro. For example:
REFERENCES"Using WordBasic" by WexTech Systems, Inc., and Microsoft Corporation, page 246 Additional query words: 2.0 word6 winword 7.0 word95 word7 winword2 6.0 ToolsMacro run macro exist template global error 511
Keywords : kbmacro kbmacroexample |
Last Reviewed: September 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |