SynonymInfo.RelatedExpressionList property (Word)
Returns a list of expressions related to the specified word or phrase. The list is returned as an array of strings. Read-only Variant.
Syntax
expression. RelatedExpressionList
expression An expression that returns a 'SynonymInfo' object.
Remarks
Typically, there are very few related expressions found in the thesaurus.
Example
This example checks to see whether any related expressions were found for the selection. If so, the meanings are displayed in a series of message boxes. If none were found, this is stated in a message box.
Set synInfo = Selection.Range.SynonymInfo
If synInfo.Found = True Then
relList = synInfo.RelatedExpressionList
If UBound(relList) <> 0 Then
For intCount = 1 To UBound(relList)
Msgbox relList(intCount)
Next intCount
Else
Msgbox "There were no related expressions found."
End If
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for