Compartilhar via


SpellingSuggestion Object

Word Developer Reference

Represents a single spelling suggestion for a misspelled word. The SpellingSuggestion object is a member of the SpellingSuggestions collection. The SpellingSuggestions collection includes all the suggestions for a specified word or for the first word in the specified range.

Remarks

Use GetSpellingSuggestions(Index), where Index is the index number, to return a single SpellingSuggestion object. The following example checks to see whether there are any spelling suggestions for the first word in the active document. If there are, the first suggestion is displayed in a message box.

Visual Basic for Applications
  If ActiveDocument.Words(1).GetSpellingSuggestions.Count <> 0 Then
    MsgBox _
        ActiveDocument.Words(1).GetSpellingSuggestions.Item(1).Name
EndIf

The Count property for the SpellingSuggestions object returns 0 (zero) if the word is spelled correctly or if there are no suggestions.

See Also