Bookmark.Application Property

 

Gets an Application that represents the creator of the Bookmark control.

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

Application Application { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Application

An Application that represents the creator of the Bookmark control.

The following code example gets, and then displays in a message box, the name and version of the application in which the bookmark appears.

This example is for a document-level customization.

private void BookmarkApplication()
{
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
            this.Controls.AddBookmark(this.Paragraphs[1].Range,
            "bookmark1");
    string applicationVersion = bookmark1.Application.Name +
        " " + bookmark1.Application.Version;
    MessageBox.Show(applicationVersion);
}
Return to top
Show: