XmlMappedRange.CheckSpelling 方法

检查 XmlMappedRange 控件中的文本的拼写。

命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)

语法

声明
Function CheckSpelling ( _
    CustomDictionary As Object, _
    IgnoreUppercase As Object, _
    AlwaysSuggest As Object, _
    SpellLang As Object _
) As Object
Object CheckSpelling(
    Object CustomDictionary,
    Object IgnoreUppercase,
    Object AlwaysSuggest,
    Object SpellLang
)

参数

  • CustomDictionary
    类型:System.Object
    指示在主字典中找不到该单词时要检查的自定义字典的文件名。如果省略此参数,则使用当前指定的字典。
  • IgnoreUppercase
    类型:System.Object
    如果让 Microsoft Office Excel 忽略全大写的单词,则为 true;如果让 Excel 检查全大写的单词,则为 false。如果省略此参数,则使用当前设置。
  • AlwaysSuggest
    类型:System.Object
    如果让 Excel 在找到错误拼写时显示建议的替换拼写的列表,则为 true;如果让 Excel 在您输入正确的拼写时暂停,则为 false。如果省略此参数,则使用当前设置。

返回值

类型:System.Object

备注

此方法没有任何返回值;Excel 显示**“拼写”**对话框。

可选参数

有关可选参数的信息,请参见Office 解决方案中的可选参数

示例

下面的代码示例使用 CheckSpelling 方法检查 XmlMappedRange 中文本的拼写。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

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

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间