RelatedWordList Property

Applies To

SynonymInfo object.

Description

Returns a list of words related to the specified word or phrase. The list is returned as an array of strings. Read-only Variant.

See Also

RelatedExpressionList property.

Example

This example checks to see whether any related words were found for the third word in the active document. If so, the meanings are displayed in a series of message boxes. If there are no related words found, this is stated in a message box.

Set mySynon = ActiveDocument.Words(3).SynonymInfo
If mySynon.Found = True Then
    myWdList = mySynon.RelatedWordList
    If UBound(myWdList) <> 0 Then
        For i = 1 To UBound(myWdList)
            Msgbox myWdList(i)
        Next i
    Else
        Msgbox "There were no related words found."
    End If
End If