Compartilhar via


XmlMappedRange.CheckSpelling(Object, Object, Object, Object) Method

Definition

Checks the spelling of text in the XmlMappedRange control.

public object CheckSpelling (object CustomDictionary, object IgnoreUppercase, object AlwaysSuggest, object SpellLang);
abstract member CheckSpelling : obj * obj * obj * obj -> obj
Public Function CheckSpelling (Optional CustomDictionary As Object, Optional IgnoreUppercase As Object, Optional AlwaysSuggest As Object, Optional SpellLang As Object) As Object

Parameters

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

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

SpellLang
Object

The language of the dictionary being used. Can be one of the MsoLanguageID values used by the LanguageID[MsoAppLanguageID] property.

Returns

Examples

The following code example uses the CheckSpelling method to check the spelling of text in an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void CheckSpellingErrors()
{
    this.CustomerLastNameCell.Value2 = "Smth";
    this.CustomerLastNameCell.CheckSpelling(true, true,
        Office.MsoLanguageID.msoLanguageIDEnglishUS);
}
Private Sub CheckSpellingErrors()
    Me.CustomerLastNameCell.Value2 = "Smth"
    Me.CustomerLastNameCell.CheckSpelling(IgnoreUppercase:=True, _
        AlwaysSuggest:=True, SpellLang:=Office.MsoLanguageID.msoLanguageIDEnglishUS)
End Sub

Remarks

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

Optional Parameters

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

Applies to