Application.CheckGrammar Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Checks a string for grammatical errors. Returns a Boolean to indicate whether the string contains grammatical errors. True if the string contains no errors.

expression .CheckGrammar(String)

expression Required. A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

String

Required

String

The string you want to check for grammatical errors.

Return Value

Boolean

This example displays the result of a grammar check on the selection.

strPass = Application.CheckGrammar(String:=Selection.Text) 
MsgBox "Selection is grammatically correct: " & strPass
Show: