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

SynonymInfo Object

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.