Bookmark.InlineShapes Özellik

Tanım

InlineShapesDenetimdeki tüm nesneleri temsil eden bir koleksiyon alır InlineShape Bookmark .

public Microsoft.Office.Interop.Word.InlineShapes InlineShapes { get; }

Özellik Değeri

InlineShapes

InlineShapesBir denetimdeki tüm nesneleri temsil eden bir koleksiyon InlineShape Bookmark .

Örnekler

Aşağıdaki kod örneği, belgeye bir Bookmark denetim ekler ve sonra yer işaretine yatay bir çizgi ekler. Kod ardından, yer işaretinin içerdiği satır içi şekillerin toplam sayısını bir ileti kutusunda görüntüler.

Bu örnek, belge düzeyinde özelleştirme içindir

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

Şunlara uygulanır