Chart.CheckSpelling, méthode

Vérifie l'orthographe d'un objet. Microsoft Office Excel affiche la boîte de dialogue Orthographe

Espace de noms :  Microsoft.Office.Tools.Excel
Assembly :  Microsoft.Office.Tools.Excel (dans Microsoft.Office.Tools.Excel.dll)

Syntaxe

'Déclaration
Sub CheckSpelling ( _
    CustomDictionary As Object, _
    IgnoreUppercase As Object, _
    AlwaysSuggest As Object, _
    SpellLang As Object _
)
void CheckSpelling(
    Object CustomDictionary,
    Object IgnoreUppercase,
    Object AlwaysSuggest,
    Object SpellLang
)

Paramètres

  • CustomDictionary
    Type : System.Object
    Le nom de fichier du dictionnaire personnel à examiner si le mot n'est pas trouvé dans le dictionnaire principal.Si cet argument est omis, le dictionnaire actuellement spécifié est utilisé.
  • IgnoreUppercase
    Type : System.Object
    true pour que Microsoft Office Excel ignore les mots tout en majuscules.false pour qu'Excel vérifie les mots écrits en majuscules.Si cet argument est omis, le paramètre actuel est utilisé.
  • AlwaysSuggest
    Type : System.Object
    true pour qu'Excel affiche une liste d'autres suggestions orthographiques lorsqu'il détecte un mot mal orthographié.false pour qu'Excel attende que vous saisissiez l'orthographe correcte.Si cet argument est omis, le paramètre actuel est utilisé.

Notes

Paramètres optionnels

Pour plus d'informations sur les paramètres optionnels, consultez Paramètres optionnels dans les solutions Office.

Exemples

L'exemple de code suivant crée un Chart avec des fautes d'orthographe dans le titre, puis utilise la méthode CheckSpelling pour vérifier l'orthographe dans le graphique en ignorant les mots en majuscules et en suggérant des variantes orthographiques.

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, 
        Excel.XlRowCol.xlColumns);

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

Sécurité .NET Framework

Voir aussi

Référence

Chart Interface

Microsoft.Office.Tools.Excel, espace de noms