多种对象![]() |
代表一个对拼写错误单词的拼写建议。SpellingSuggestion 对象是 SpellingSuggestions 集合中的一个元素。SpellingSuggestions 集合包括指定单词或指定区域中第一个单词的所有拼写建议。
用 GetSpellingSuggestions(index) 可返回单独的 GetSpellingSuggestion 对象,其中 index 为索引序号。下例检查活动文档中的第一个单词是否有拼写建议。如果有,则在消息框中显示第一个建议。
If ActiveDocument.Words(1).GetSpellingSuggestions.Count <> 0 Then
MsgBox _
ActiveDocument.Words(1).GetSpellingSuggestions.Item(1).Name
EndIf
如果 SpellingSuggestions 对象的 Count 属性返回 0(零),则该单词拼写正确或没有建议。