返回与指定单词或短语相关的单词列表。该列表以字符串数组形式返回。Variant 类型,只读。
expression.RelatedWordList
expression 必需。该表达式返回一个 SynonymInfo 对象。
本示例检查活动文档中第三个单词是否有相关的单词。如果有,则在一组信息框中显示其含义。如果没有找到相关单词,则在消息框中加以说明。
Set synInfo = ActiveDocument.Words(3).SynonymInfo
If synInfo.Found = True Then
relList = synInfo.RelatedWordList
If UBound(relList) <> 0 Then
For intCount = 1 To UBound(relList)
Msgbox relList(intCount)
Next intCount
Else
Msgbox "There were no related words found."
End If
End If