CheckSpelling Method
Collapse the table of content
Expand the table of content

NamedRange.CheckSpelling Method (Object, Object, Object, Object)


Checks the spelling of text in the NamedRange control.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

object CheckSpelling(
	object CustomDictionary,
	object IgnoreUppercase,
	object AlwaysSuggest,
	object SpellLang


Type: System.Object

Indicates the file name of the custom dictionary to be examined if the word is not found in the main dictionary. If this argument is omitted, the currently specified dictionary is used.

Type: System.Object

true to have Microsoft Office Excel ignore words that are all uppercase; false to have Excel check words that are all uppercase. If this argument is omitted, the current setting is used.

Type: System.Object

true to have Excel display a list of suggested alternate spellings when an incorrect spelling is found; false to have Excel pause while you input the correct spelling. If this argument is omitted, the current setting is used.

Type: System.Object

The language of the dictionary being used. Can be one of the T:Microsoft.Office.Core.MsoLanguageID values used by the P:Microsoft.Office.Core.LanguageSettings.LanguageID(Microsoft.Office.Core.MsoAppLanguageID) property.

Return Value

Type: System.Object

This form has no return value; Excel displays the Spelling dialog box.

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example uses the CheckSpelling method to check the spelling of the string "Mongeese".

This example is for a document-level customization.

private void CheckRangeSpelling()
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =

    namedRange1.Value2 = "Mongeese";
    namedRange1.CheckSpelling(true, true,
Return to top
© 2015 Microsoft