Check Spelling and Grammar in Selected Text in Microsoft Word
Question details
The user wants to check spelling and grammar in a selected portion of a Word document.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Review a passage without checking the entire document.
- Observed behavior
- The standard spelling and grammar review command generally checks the entire document in current versions of Word.
Open the document in a desktop version of Word that supports VBA macros. Select the text you want to review, and make sure macro security settings allow you to run code you trust.
Run a VBA macro on the selected Word text
Use this method to run spelling and grammar checks against the selected range rather than the whole document.
The macro uses a duplicate of the selected range for Word's spelling and grammar checks. The available review dialogs and suggestions may vary by Word version and proofing language.
In desktop Word, open Developer > Visual Basic. On Windows, you can also press Alt+F11.
In the VBA editor, choose Insert > Module and paste the following code: Sub CheckSelectedText() Dim target As Range If Selection.Type = wdSelectionIP Then MsgBox "Select text before running this macro." Exit Sub End If Set target = Selection.Range.Duplicate target.CheckSpelling target.CheckGrammar End Sub
Return to the document and select the passage. Open Developer > Macros, select CheckSelectedText, and click Run. Review the spelling and grammar suggestions presented by Word.

Edit and proofread documents with WPS Writer
WPS Office is a free, lightweight alternative for editing and proofreading documents in a familiar interface. Its Microsoft Word format compatibility makes it easy to move existing files into WPS Writer.

Frequently Asked Questions
Why does Word check the whole document when I select text?
In current versions of Word, the standard spelling and grammar review command generally checks the entire document. A VBA macro using Selection.Range can target the selected passage instead.
Can I run this macro in Word for the web?
No. Open the document in a desktop version of Word that supports VBA, then use Developer > Macros to run it.
How do I keep the macro in my document?
In desktop Word, choose File > Save As and select Word Macro-Enabled Document (*.docm). Run macros only when you trust their source.
Can the classic spelling and grammar dialog check only my selection?
A macro can open the classic dialog with Dialogs(wdDialogToolsSpellingAndGrammar).Execute, but opening the dialog alone does not ensure the review stays within the selection. Use a selected Range for a targeted check.
How can I ask Microsoft to restore selection-only review?
In Word, look for File > Feedback and describe the selection-only spelling and grammar review feature you need.




