DocumentHasMisspellings()

Syntax

DocumentHasMisspellings()

Remarks

Returns information about the status of automatic spell checking in the active document. In Word version 6.0, DocumentHasMisspellings() is unavailable and generates an error.

The DocumentHasMisspellings() function returns the following values.

Value

Explanation

-1

If automatic spell checking is turned off (unless the document is empty), or if checking is in progress

0 (zero)

If the document has been completely checked and contains no misspellings, or if the document is empty

1

If the document has been completely checked and contains at least one misspelling


Example

This example enables automatic spell checking and finds the next misspelled word in the active document. (Errors are shown if the document either hasn't been checked for spelling errors or has been completely checked and contains misspellings.) When it locates the misspelled word, the example opens the shortcut menu containing spelling suggestions.


If DocumentHasMisspellings() <> 1 Then
    ToolsOptionsSpelling .AutomaticSpellChecking = 1, .HideSpellingErrors = 0
End If
NextMisspelling

See Also

NextMisspelling, ToolsGetSpelling, ToolsLanguage, ToolsOptionsSpelling