Corruption with Macro Run on ToolsGrammar and ToolsSpellingLast reviewed: February 5, 1998Article ID: Q82251 |
The information in this article applies to:
SUMMARYIf you run a macro that calls a modeless dialog box such as ToolsSpelling or ToolsGrammar in Microsoft Word for Windows unexpected results occur if you use ToolsMacro to run the command rather than calling the command directly.
MORE INFORMATIONA modeless dialog box is one that you can activate and switch away from by clicking another active window. For example, you can click your document to switch away from the dialog box. The Spelling and Grammar commands have this type of dialog box. A modal dialog box is a one that requires you to choose the OK or Cancel button to close the dialog box before you can switch to another action, window, or dialog box.
WORKAROUNDTo avoid any unexpected results when calling a modeless dialog box, use the command directly. In a macro, use the ToolsSpelling and ToolsGrammar commands rather than ToolsMacro "ToolsSpelling" or ToolsMacro "ToolsGrammar."
Steps to Reproduce Problem
Note: This behavior occur on the first try. It is expected that the word "an" should be replaced with "a," and the selection should not be altered. The "yo" should not be inserted until after the dialog box has been exited. The problem is that "yo" is inserted underneath the dialog box before the change is made, but the dialog box does not lose the focus. This problem occurs with any modeless dialog box. Any macro that uses ToolsMacro .Run on a modeless dialog box (ToolsSpelling, ToolsGrammar) will experiencee similar problems.
|
KBCategory: kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |