Bookmark.InsertBreak Yöntem

Sayfa, sütun veya bölümü geçirebileceği ekler Bookmark denetim.

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

Sözdizimi

'Bildirim
Sub InsertBreak ( _
    ByRef Type As Object _
)
void InsertBreak(
    ref Object Type
)

Parametreler

Notlar

Bu yöntemin çağrılması Bookmark denetiminin silinmesine neden olabilir.

İsteğe Bağlı Parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi edinmek için bkz. Office Çözümlerinde İsteğe Bağlı Parametreler.

Ö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ı