Share via


GetSpellingSuggestions Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

                 

Syntax 1: Returns a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the specified range.

Syntax 2: Returns a SpellingSuggestions collection that represents the words suggested as spelling replacements for a given word.

Syntax 1

expression**.GetSpellingSuggestions(CustomDictionary**, IgnoreUppercase, MainDictionary, SuggestionMode, CustomDictionary2  CustomDictionary10)

Syntax 2

expression**.GetSpellingSuggestions(Word**, CustomDictionary, IgnoreUppercase, MainDictionary, SuggestionMode, CustomDictionary2  CustomDictionary10)

expression   Syntax 1: Required. An expression that returns a Range object.

Syntax 2: Optional. An expression that returns an Application object.

Word   Required String. The word whose spelling is to be checked.

CustomDictionary   Optional Variant. Either an expression that returns a Dictionary object or the file name of the custom dictionary.

IgnoreUppercase   Optional Variant. True to ignore words in all uppercase letters. If this argument is omitted, the current value of the IgnoreUppercase property is used.

MainDictionary   Optional Variant. Either an expression that returns a Dictionary object or the file name of the main dictionary. If you don't specify a main dictionary, Word uses the main dictionary that corresponds to the language formatting of Word or of the first word in the range.

SuggestionMode   Optional Variant. Specifies the way Word makes spelling suggestions. Can be one of the following WdSpellingWordType constants. The default value is WdSpellword.

Constant Description
wdSpellword Word suggests correct spellings for the word or the first word in the specified range.
wdWildcard Word suggests replacements that match the search criteria for a word that contains the question mark (?) or asterisk (*) wildcard character.
wdAnagram Word suggests anagrams for the word. Word doesn't suggest anagrams from a custom dictionary.

Note   This parameter may be ignored, depending on the dictionary file that's in use.

CustomDictionary2  CustomDictionary10   Optional Variant. Either an expression that returns a Dictionary object or the file name of an additional custom dictionary. You can specify as many as nine additional dictionaries.

Remarks

If the word is spelled correctly, the Count property of the SpellingSuggestions object returns 0 (zero).