Application.CheckGrammar Method

Word Developer Reference

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.

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

See Also