SpellingSuggestions 对象(Word)SpellingSuggestions object (Word)

SpellingSuggestion对象的集合,这些对象代表指定单词或指定范围中的第一个单词的所有建议。A collection of SpellingSuggestion objects that represent all the suggestions for a specified word or for the first word in the specified range.


使用 GetSpellingSuggestions 方法返回 SpellingSuggestions 集合。Use the GetSpellingSuggestions method to return the SpellingSuggestions collection. SpellingSuggestions 方法,应用于 应用程序 对象,必须指定要检查的单词。The SpellingSuggestions method, when applied to the Application object, must specify the word to be checked. GetSpellingSuggestions 方法应用于区域时,将检查范围中的第一个单词。When the GetSpellingSuggestions method is applied to a range, the first word in the range is checked. 下面的示例检查以查看是否存在任何活动文档中的单词的拼写建议。The following example checks to see whether there are any spelling suggestions for any of the words in the active document. 如果有,请在消息框中显示这些建议。If there are, the suggestions are displayed in message boxes.

For Each wd In ActiveDocument.Words 
 Set sugg = wd.GetSpellingSuggestions 
 If sugg.Count <> 0 Then 
 For Each ss In sugg 
 MsgBox ss.Name 
 Next ss 
 End If 
Next wd

不能在拼写建议集合中添加或删除建议。You cannot add suggestions to or remove suggestions from the collection of spelling suggestions. 拼写建议是从主词典或自定义词典文件中获取的。Spelling suggestions are derived from main and custom dictionary files.

另请参阅See also

Word 对象模型参考Word Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.