ChartSheetBase.CheckSpelling Method (Object, Object, Object, Object)

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

public void CheckSpelling(
	object customDictionary,
	object ignoreUppercase,
	object alwaysSuggest,
	object spellLang
)

Parameters

customDictionary
Type: System.Object

A string that 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.

ignoreUppercase
Type: System.Object

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

alwaysSuggest
Type: System.Object

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

spellLang
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.

Microsoft Office 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 in the current Microsoft.Office.Tools.Excel.ChartSheetBase using the US English dictionary.

private void CheckForSpellingErrors()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.ChartWizard(Globals.Sheet1.Range["A1", "B5"], 
        Excel.XlChartType.xl3DColumn, 
        Excel.XlRowCol.xlColumns);

    this.CheckSpelling(false, true,
        Office.MsoLanguageID.msoLanguageIDEnglishUS);
}
Return to top
Show: