Freigeben über


Bookmark.Application Property

Definition

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

public:
 property Microsoft::Office::Interop::Word::Application ^ Application { Microsoft::Office::Interop::Word::Application ^ get(); };
public Microsoft.Office.Interop.Word.Application Application { get; }
member this.Application : Microsoft.Office.Interop.Word.Application
Public ReadOnly Property Application As Application

Property Value

An Application that represents the creator of the Bookmark control.

Examples

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);
}
Private Sub BookmarkApplication()

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Dim applicationVersion As String = Bookmark1.Application.Name & _
        " " & Bookmark1.Application.Version
    MessageBox.Show(applicationVersion)

End Sub

Applies to