Udostępnij za pośrednictwem


Bookmark.Application Property (2007 System)

Gets an Application that represents the creator of 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 Application As Application
'Usage
Dim instance As Bookmark 
Dim value As Application 

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

Property Value

Type: Application
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 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
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);
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace