Bookmark.Sections Özellik

Alır bir Sections bölümlerde temsil eden bir koleksiyon Bookmark denetim.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property Sections As Sections
Sections Sections { get; }

Özellik Değeri

Tür: Microsoft.Office.Interop.Word.Sections
A Sections bölümlerde temsil eden bir koleksiyon Bookmark denetim.

Örnekler

Aşağıdaki kod örneği ekler bir Bookmark metin belgesi ve ardından ekler denetimle bir Sonraki sayfa önce dördüncü word yer işareti içinde bölüm sonu.

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

Private Sub BookmarkInsertBreak()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Text = "This text will have a section break."
    Bookmark1.Words(4).InsertBreak(Word.WdBreakType _
        .wdSectionBreakNextPage)

    MessageBox.Show("bookmark1 contains " & _
        Bookmark1.Sections.Count.ToString & " sections.")

End Sub
private void BookmarkInsertBreak()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This text will have a section break.";

    object Type = Word.WdBreakType.wdSectionBreakNextPage;
    bookmark1.Words[4].InsertBreak(ref Type);
    MessageBox.Show("bookmark1 contains " + bookmark1.Sections.Count +
        " sections.");
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Bookmark Arabirim

Microsoft.Office.Tools.Word Ad Alanı