Share via


Bookmark.EnhMetaFileBits Property (2007 System)

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

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 EnhMetaFileBits As Object
'Usage
Dim instance As Bookmark 
Dim value As Object 

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

Property Value

Type: System.Object
A picture representation of how the range of the Bookmark control appears.

Remarks

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

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 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
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;
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace