The information in this article applies to:
SUMMARY
In the Microsoft Word for Windows 2.x WordBasic macro language, the
ToolsMacro .Run command is not designed to follow the context hierarchy
prescribed for running Word for Windows macros. This is because
the command corresponds to the Macro dialog box where the context is
selected with an option button in the Show box.
MORE INFORMATION
When you run a Word for Windows macro from the command line (ie. if
you start Word by typing "WIN WINWORD /mMyMacro" at the MS-DOS
prompt), Word looks for the macro first in the document template, then
in Normal.dot, and finally in the built-in commands. This hierarchy
holds even if the macro has the same name as a built-in command (such
as FilePrint).
Word versions 6.x, 7.xIf you run a macro using the ToolsMacro .Run command with the .Show argument 0, the macro runs according to Word's macro searching hierarchy. In the following example, Word looks for the macro first in the document template, then in Normal.dot, and finally in the built-in commands.
Word for Windows version 2.xIf you run a macro using the ToolsMacro .Run command without the .Show argument AND have not previously chosen Macro from the Tools menu, the .Show argument defaults according to the .Store argument in the Template dialog box (accessed by choosing Template from the File menu). The .Store argument corresponds to the options in the Store New Macros And Glossaries As box. The .Store argument corresponds as follows to the .Show argument:
If you want Word for Windows to follow the Template, Global, Built-in
Command context hierarchy for macro execution in Word for Windows
version 2.x (assuming the name is not the same as a built-in command),
run your macro by calling its name rather than using the ToolsMacro
statement.
REFERENCES
"Using WordBasic," by WexTech Systems and Microsoft, pages 210, 308
Additional query words: winword2 wrong
Keywords : kbmacro kbprg kbdtacode kbtemplate wordnt winword ntword macword word6 word7 word95 |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |