Bookmark.InlineShapes Property (2007 System)
Gets an InlineShapes collection that represents all the InlineShape objects in a 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 InlineShapes As InlineShapes
'Usage
Dim instance As Bookmark
Dim value As InlineShapes
value = instance.InlineShapes
[BrowsableAttribute(false)]
public InlineShapes InlineShapes { get; }
[BrowsableAttribute(false)]
public:
property InlineShapes^ InlineShapes {
InlineShapes^ get ();
}
public function get InlineShapes () : InlineShapes
Property Value
Type: InlineShapes
An InlineShapes collection that represents all the InlineShape objects in a Bookmark control.
Examples
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 Sub BookmarkInlineShapes()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.InlineShapes.AddHorizontalLineStandard(Bookmark1.Range)
MessageBox.Show("Number of inline shapes in Bookmark1: " & _
Bookmark1.InlineShapes.Count.ToString)
End Sub
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());
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.