Share via


Bookmark.EnhMetaFileBits Property

Definition

Gets a picture representation of how the range of the Bookmark control appears.

public:
 property System::Object ^ EnhMetaFileBits { System::Object ^ get(); };
public object EnhMetaFileBits { get; }
member this.EnhMetaFileBits : obj
Public ReadOnly Property EnhMetaFileBits As Object

Property Value

A picture representation of how the range of the Bookmark control appears.

Examples

The following code example adds a Bookmark control with text to the first paragraph and then stores a picture representation of the text of the bookmark in a variable.

This example is for a document-level customization.

private void BookmarkEnhMetaFileBits()
{
    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.";
    object pictureText = bookmark1.EnhMetaFileBits;
}
Private Sub BookmarkEnhMetaFileBits()
    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."
    Dim pictureText As Object = Bookmark1.EnhMetaFileBits

End Sub

Remarks

The EnhMetaFileBits property returns an array of bytes, which can be used with the Microsoft Windows APIs.

Applies to