Share via


SynonymInfo.SynonymList Property (Word)

Returns a list of synonyms for a specified meaning of a word or phrase. The list is returned as an array of strings. Read-only Variant.

Syntax

expression .SynonymList(Meaning)

expression An expression that returns a SynonymInfo object.

Example

This example returns a list of synonyms for the word "big," using the meaning "generous" in U.S. English.

Slist = SynonymInfo(Word:="big", LanguageID:=wdEnglishUS) _ 
 .SynonymList(Meaning:="generous") 
For i = 1 To UBound(Slist) 
 Msgbox Slist(i) 
Next i

This example returns a list of synonyms for the second meaning of the selected word or phrase and displays these synonyms in the Immediate window of the Visual Basic editor. If there is no second meaning or if there are no synonyms, this is stated in a message box.

Set mySi = Selection.Range.SynonymInfo 
If mySi.MeaningCount >= 2 Then 
 synList = mySi.SynonymList(Meaning:=2) 
 For i = 1 To UBound(synList) 
 Debug.Print synList(i) 
 Next i 
Else 
 MsgBox "There is no second meaning for this word or phrase." 
End If

See Also

Concepts

SynonymInfo Object Members

SynonymInfo Object