Insert Word Page Break in Document in C#, VB.NET

Word Page Break, a mark to present ending of one page and beginning of new page, can be inserted automatically when users fill one page with contents or manually at a specified location by users. This guide demonstrates an easy solution to insert page break to split one page contents into two pages in C#, VB.NET via Spire.Doc for .NET. The following screenshot shows result after inserting Word page break.

Word Page Breaks

Spire.Doc for .NET provides Paragraph.AppendBreak method with customers to insert break easily in Word. The overload, which should be passed to this method, is BreakType (enum-type). There are three break types offered by Spire.Doc for .NET, PageBreak, ColumnBreak and LineBreak. Download and install Spire.Doc for .NET and follow the code blow to insert Word page break behind the specified paragraph.

using Spire.Doc;
using Spire.Doc.Documents;

namespace WordBreak
    class Program
        static void Main(string[] args)
            Document document = new Document();
            document.LoadFromFile(@"E:\Work\Documents\WordDocuments\.NET Framework.docx");


            document.SaveToFile("PageBreak.docx", FileFormat.Docx2010);
Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace WordBreak
    Friend Class Program
        Shared Sub Main(ByVal args() As String)
            Dim document As New Document()
            document.LoadFromFile("E:\Work\Documents\WordDocuments\.NET Framework.docx")


            document.SaveToFile("PageBreak.docx", FileFormat.Docx2010)
        End Sub
    End Class
End Namespace

Spire.Doc, a professional Word component, enables developers/programmers perform a wide range of processing tasks, such as generate, write, modify and save for their customize .NET, Silverlight and WPF applications.