Expand Minimize

Bookmark.InlineShapes Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets an InlineShapes collection that represents all the InlineShape objects in a Bookmark control.

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

InlineShapes InlineShapes { get; }

Property Value

Type: Microsoft.Office.Interop.Word.InlineShapes
An InlineShapes collection that represents all the InlineShape objects in a Bookmark control.

The following code example adds a Bookmark control to the document and then adds a horizontal line to the bookmark. The code then displays the total number of inline shapes the bookmark contains in a message box.

This example is for a document-level customization.

private void BookmarkInlineShapes()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    object myRange = bookmark1.Range;
    bookmark1.InlineShapes.AddHorizontalLineStandard(ref myRange);
    MessageBox.Show("Number of inline shapes in bookmark1: " +
        bookmark1.InlineShapes.Count.ToString());
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft