Can't Edit Selected Text when Grammar/Spelling Macro Modified

ID: Q94768

The information in this article applies to:

SUMMARY

In Microsoft Word for Windows, when you run the Grammar command or the Spelling command from a modified macro, you must exit the Grammar or Spelling dialog box before you can edit information in the document window.

MORE INFORMATION

When the Grammar command identifies a sentence for grammatical errors or when the Spelling checker identifies a questionable word, you can make changes directly in your document while the Grammar or Spelling dialog box is present. The Spelling and Grammar dialog boxes behave this way because they are modeless dialog boxes: it is not necessary to cancel out of these dialog boxes to make changes in your document. However, if you run the Grammar command or the Spelling command from a modified macro, you must first cancel the Grammar or Spelling dialog box in order to make changes directly in your document.

Steps to Reproduce Problem

1. From the Tools menu, choose Macro.

2. In the Macro dialog box, under Show, verify that the Commands option is

   selected.

3. Under Macro Names, choose the ToolsGrammar macro and choose the Edit
   button.

4. Edit the macro to read as follows (delete the word "Super"):

      Sub Main
      ToolsGrammar
      End Sub

5. From the File menu, choose Close. When you are prompted to save the
   changes to global:ToolsGrammar, choose the Yes button.

6. In a new document, type the following text:

      Walking in a park.

7. From the Tools menu, choose Grammar.

8. When the sentence is selected with the grammar dialog in the foreground,

   try selecting text somewhere in the selected text (outside of the
   Grammar dialog box).

The system will beep, indicating that the document cannot be edited while the Grammar dialog box is on the screen.

This same situation occurs if you edit the ToolsSpelling macro and choose the Spelling command from the Tools menu.

Note: You will experience a similar situation when the Spelling Checker is run from the Grammar checker; you will not be able to edit the document until the Spelling dialog box is canceled.

KBCategory: kbmacro KBSubcategory:

Additional query words:   2.0 2.0a 2.0a-cd  winword2 word6
winword 2.0b 2.0c 6.0 6.0a 6.0c
Keywords          : kbproof 
Version           : 2.0 2.0a 2.0a-CD 2.0b 2.0c
Platform          : WINDOWS

Last Reviewed: February 6, 1998