Chart.CheckSpelling Method (2007 System)

Checks the spelling of an object. Microsoft Office Excel displays the Spelling dialog box

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

Syntax

'Declaration
Public Sub CheckSpelling ( _
    CustomDictionary As Object, _
    IgnoreUppercase As Object, _
    AlwaysSuggest As Object, _
    SpellLang As Object _
)
'Usage
Dim instance As Chart 
Dim CustomDictionary As Object 
Dim IgnoreUppercase As Object 
Dim AlwaysSuggest As Object 
Dim SpellLang As Object

instance.CheckSpelling(CustomDictionary, _
    IgnoreUppercase, AlwaysSuggest, _
    SpellLang)
public void CheckSpelling(
    Object CustomDictionary,
    Object IgnoreUppercase,
    Object AlwaysSuggest,
    Object SpellLang
)
public:
void CheckSpelling(
    Object^ CustomDictionary, 
    Object^ IgnoreUppercase, 
    Object^ AlwaysSuggest, 
    Object^ SpellLang
)
public function CheckSpelling(
    CustomDictionary : Object, 
    IgnoreUppercase : Object, 
    AlwaysSuggest : Object, 
    SpellLang : Object
)

Parameters

  • CustomDictionary
    Type: System.Object

    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 Excel check words that are all uppercase. If this argument is omitted, the current setting is 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 is used.

Remarks

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example creates a Chart with misspellings in the title, and then uses the CheckSpelling method to check the spelling in the chart while ignoring uppercase words and suggesting alternate spellings.

Private Sub CatchSpellingError()
    Me.Range("A1", "A5").Value2 = 22
    Me.Range("B1", "B5").Value2 = 55

    Dim Chart1 As Microsoft.Office.Tools.Excel.Chart = _
        Me.Controls.AddChart(Me.Range("D2", "H12"), "Chart1")

    Chart1.ChartWizard(Me.Range("A1", "B5"), _
        Excel.XlChartType.xl3DColumn, PlotBy:=Excel.XlRowCol.xlColumns, _
        Title:="Salez Datta")

    Chart1.CheckSpelling(IgnoreUppercase:=True, AlwaysSuggest:=True, _
        SpellLang:=Office.MsoLanguageID.msoLanguageIDEnglishUS)
End Sub
private void CatchSpellingError()
{
    this.Range["A1", "A5"].Value2 = 22;
    this.Range["B1", "B5"].Value2 = 55;

    Microsoft.Office.Tools.Excel.Chart chart1 =
        this.Controls.AddChart(this.Range["D2", "H12"], 
        "chart1");

    chart1.ChartWizard(this.Range["A1", "B5"], 
        Excel.XlChartType.xl3DColumn, missing, 
        Excel.XlRowCol.xlColumns, missing, missing, missing,
        "Salez Datta", missing, missing, missing);

    chart1.CheckSpelling(missing, true, true,
        Office.MsoLanguageID.msoLanguageIDEnglishUS);
}

.NET Framework Security

See Also

Reference

Chart Class

Chart Members

Microsoft.Office.Tools.Excel Namespace