Application.CheckGrammar method (Word)

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

Syntax

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

Example

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

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

See also

Application Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.