
#VBA INSERT PAGE BREAK IN WORD DOCUMENT CODE#
VB.Net Code example Private Sub btnBreaks_Click(sender As Object, e As RibbonControlEventArgs) Handles btnBreaks.Click Create a ribbon designer and put button.Create Excel Addin in C# or VB code style (Visual Studio Tools for Office).Visual Studio 2015 or above having Microsoft Office for Developer Tool installed.OSelection.InsertBreak Type:=wdSectionBreakOddPage OSelection.InsertBreak Type:=wdSectionBreakEvenPage OSelection.InsertBreak Type:=wdSectionBreakContinuous OSelection.InsertBreak Type:=wdSectionBreakNextPage OSelection.InsertBreak Type:=wdTextWrappingBreak OSelection.InsertBreak Type:=wdSectionNewColumn OSelection.InsertBreak Type:=wdSectionNewPage VBA Code example Public Sub InsertPageBreaks() Place the cursor from where you wish to insert new break.Odd Page: insert a section break and start the new section on the next odd-numbered page.

Even Page: insert a section break and start the new section on the next even-numbered page.Continuous: insert a section break and start the new section on the same page.Next Page: insert a section break and start the new section on the next page.Text Wrapping: separates text around the object.Column: the text will move to the next column.Page: breaks the page and take the control to new page.

To separate the information in different blocks, or pages, Microsoft word offers two types of breaks PageBreaks and SectionBreaks both can be inserted using a range or selection object.
