Class SpellingSuggestions (Word VBA)

A collection of SpellingSuggestion objects that represent all the suggestions for a specified word or for the first word in the specified range. To use a SpellingSuggestions class variable it first needs to be instantiated, for example


Dim sss as SpellingSuggestions
Set sss = Dim strWord As String: strWord = 
GetSpellingSuggestions(Word:=strWord)

Count

Returns a Long that represents the number of spelling suggestions in the collection.


Dim lngCount As Long
lngCount = GetSpellingSuggestions.Count

Item

Returns an individual SpellingSuggestion object in a collection.

Item (Index)

Index: The individual object to be returned. Can be a Long indicating the ordinal position of the individual object.


Dim ssn As SpellingSuggestion
Set ssn = GetSpellingSuggestions(Index:=1)

SpellingErrorType

Returns the spelling error type. Possible return values are wdSpellingCapitalization - Capitalization error, wdSpellingCorrect - Spelling is correct, wdSpellingNotInDictionary - The word is not in the specified dictionary.

Use the GetSpellingSuggestions method to return a collection of words suggested as spelling replacements. If a word is misspelled, the CheckSpelling method returns True.


Set suggs = ActiveDocument.Content.GetSpellingSuggestions 
If suggs.SpellingErrorType = wdSpellingNotInDictionary Then 
 StatusBar = "Unknown word" 
End If