Share via


Bookmark.SynonymInfo Property (2007 System)

Gets a SynonymInfo that contains information from the thesaurus on synonyms, antonyms, or related words and expressions for the text in the Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property SynonymInfo As SynonymInfo
'Usage
Dim instance As Bookmark 
Dim value As SynonymInfo 

value = instance.SynonymInfo
[BrowsableAttribute(false)]
public SynonymInfo SynonymInfo { get; }
[BrowsableAttribute(false)]
public:
property SynonymInfo^ SynonymInfo {
    SynonymInfo^ get ();
}
public function get SynonymInfo () : SynonymInfo

Property Value

Type: SynonymInfo
A SynonymInfo that contains information from the thesaurus on synonyms, antonyms, or related words and expressions for the text in the Bookmark control.

Examples

The following code example adds a Bookmark control with text to the document and then displays a message box if a synonym is found for the third word in the bookmark.

This example is for a document-level customization.

Private Sub BookmarkSynonymInfo()

    Me.Paragraphs(1).Range.InsertParagraphBefore()

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Text = "This is sample bookmark text." 

    If bookmark1.Words(3).SynonymInfo.Found Then
        MessageBox.Show("A synonym for " & Bookmark1.Words(3).Text _
            & "was found.")
    End If 

End Sub
private void BookmarkSynonymInfo()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This is sample bookmark text.";

    if(bookmark1.Words[3].SynonymInfo.Found)
    {
        MessageBox.Show("A synonym for " + bookmark1.Words[3].Text +
            "was found.");
    }   
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace