CheckSpelling Method

See Also         Example         Applies To

Syntax 1: Begins a spelling check for the specified document or range. If the document or range contains errors, this method displays the Spelling and Grammar dialog box (Tools menu), with the Check grammar check box cleared. For a document, this method checks all available stories (such as headers, footers, and text boxes).

Syntax 2: Checks a string for spelling errors. Returns True if the string has no spelling errors.

Syntax 1

expression.CheckSpelling(CustomDictionary, IgnoreUppercase, AlwaysSuggest, CustomDictionary2 – CustomDictionary10)

Syntax 2

expression.CheckSpelling(Word, CustomDictionary, IgnoreUppercase, MainDictionary, CustomDictionary2 – CustomDictionary10)

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

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

Word   Required String. The text 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 if capitalization is ignored. If this argument is omitted, the current value of the IgnoreUppercase property is used.

AlwaysSuggest   Optional Variant. True if Word always suggests alternative spellings. If this argument is omitted, the current value of the SuggestSpellingCorrections property is used.

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

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.