SynonymInfo Property
Applies To
Application object, Global object, Range object.
Description
Returns a SynonymInfo object that contains information from the thesaurus on synonyms, antonyms, or related words and expressions for the specified word or phrase. Read-only.
Syntax 1
expression.SynonymInfo
Syntax 2
expression.SynonymInfo(Word, LanguageID)
expression Syntax 1: Required. An expression that returns a Range object.
Syntax 2: Optional. An expression that returns an Application object.
Word Required String. The word or phrase to look up in the thesaurus.
LanguageID Optional Variant. The language used for the thesaurus. Can be one of the following WdLanguageID constants:
See Also
SynonymInfo object.
Example
This example returns a list of antonyms for the word "big" in U.S. English.
Alist = SynonymInfo(Word:="big", LanguageID:=wdEnglishUS).AntonymList
For i = 1 To UBound(Alist)
Msgbox Alist(i)
Next i
This example returns a list of synonyms for the selection's first meaning.
Slist = Selection.Range.SynonymInfo.SynonymList(Meaning:=1)
For i = 1 To UBound(Slist)
Msgbox Slist(i)
Next i