GetSpellingSuggestions Method Example

This example looks for the alternate spelling suggestions for the first word in the selection. If there are suggestions, the example runs a spelling check on the selection.

If Selection.Range.GetSpellingSuggestions.Count = 0 Then
    Msgbox "No suggestions."
Else
    Selection.Range.CheckSpelling
End If

This example looks for the alternate spelling suggestions for the word "blat?nt." Suggestions include replacements for the ? wildcard character. Any suggested spellings are displayed in messages boxes.

Set sugList = GetSpellingSuggestions(Word:="?ook", _
    SuggestionMode:=wdWildcard)
If sugList.Count = 0 Then
    Msgbox "No suggestions."
Else
    For each sug in sugList
        Msgbox sug.Name
    Next sug
End If