WPS 基础接口 > 文字 API 参考 > Document > 方法 > Document.CheckSpelling 方法
开始对指定的文档或区域进行拼写检查。

语法

表达式.CheckSpelling(CustomDictionary, IgnoreUppercase, AlwaysSuggest, CustomDictionary2, CustomDictionary3, CustomDictionary4, CustomDictionary5, CustomDictionary6, CustomDictionary7, CustomDictionary8, CustomDictionary9, CustomDictionary10)

表达式   必选。一个代表 Document 对象的变量。

参数

名称 必选/可选 数据类型 说明
IgnoreUppercase 可选 Variant 如果忽略大小写,则该属性值为 True。如果省略该参数,则使用 IgnoreUppercase 属性的当前值。
AlwaysSuggest 可选 Variant 如果该属性值为 True,则 WPS 总是给出建议的拼写。如果省略该参数,则使用 SuggestSpellingCorrections 属性的当前值。

说明

如果该文档或区域中包含错误,则该方法显示“拼写和语法”对话框(“工具”菜单),其中“检查语法”复选框处于清除状态。该方法应用于文档时,将检查文档中所有可用文字的拼写(如页眉、页脚和文本框)。

示例

以下示例检查活动文档中的拼写。

示例代码
ActiveDocument.CheckSpelling()


请参阅