UserDict 属性

       

当在工作表上执行拼写检查时,命令 Microsoft Excel 创建自定义词典,以便向该词典中添加新单词。String 类型,可读写。

expression.UserDict

expression   必需。该表达式返回“应用于”列表中的对象之一。

示例

本示例命令 Microsoft Excel 利用拼写选项功能创建名为“Custom1.dic”的自定义词典,然后通知给用户。

Sub SpecialWord()

    Application.SpellingOptions.UserDict = "Custom1.dic"
    MsgBox "The custom dictionary is currently set to: " _
        & Application.SpellingOptions.UserDict

End Sub