3 Ways to Quickly Insert Section Breaks into Your Word Document

In this article, we will focus on showing you 3 ways to quickly insert section breaks into your Word document.

Section breaks are useful as to divide a document into sections, chapters, etc. Besides, to insert section breaks is an indispensable part of setting different headers or footers on different pages.Quickly Insert Section Breaks into Your Word Document

Normally, we will have to navigate to the page and locate cursor at proper position. Next click “Page Layout” and “Breaks”. And then choose a section break type on the drop-down menu. Such a proceeding can be tedious sometimes. Therefore, we want to save you from the usual routine and adopt a quick-and-dirty solution.Click "Page Layout"->Click "Breaks"->Choose a Section Break Type

Method 1: Insert a Section Break on a Specific Page

  1. First of all, press “Alt+ F11” in Word to invoke the VBA editor.
  2. Next create a new module by clicking “Normal” in the left column.
  3. Then click “Insert” tab on the menu bar.
  4. And choose “Module” on the drop-down menu of “Insert”.Click "Normal"->Click "Insert"->Click "Module"
  5. Double click on new module as to open it.
  6. Paste the following macro on the coding area:
Sub InsertBreakOnSpecificPage()
  Dim strPageNum As String
  Dim nPageNum As Integer
 
  strPageNum = InputBox("Enter a page number: ")
  nPageNum = Int(strPageNum)
 
  Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=nPageNum
  ActiveDocument.Bookmarks("\page").Range.Select
  Selection.Collapse wdCollapseEnd
  Selection.InsertBreak Type:=wdSectionBreakContinuous
End Sub
  1. Now, click “Run” or hit “F5” to execute codes.Paste Macro->Click "Run"
  2. Next enter a page number of the target page in the prompting box. And click “OK” to proceed.Enter a Page Number ->Click "OK"

So far, you’ve inserted a section break at the end of page 2.

Note:

If you want to separate several consecutive pages as a section with the use of section breaks, you need to insert section break twice, one at the end of the last page of previous section and one at the end of the last page of this new section.

In such a case, while inserting the first break, you ought to remember entering the correct number that is the page number of the last page of previous section.

Method 2: Insert a Section Break on Each Page of a Document

  1. Firstly, install and run a macro following above steps exactly.
  2. Then replace the macro with this one:
Sub InsertBreakOnEachPage()
  Dim nTotalPageNumber As Integer
 
  For nTotalPageNumber = 1 To Selection.Information(wdNumberOfPagesInDocument)
    Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=nTotalPageNumber
    Application.Browser.Target = wdBrowsePage
    ActiveDocument.Bookmarks("\page").Range.Select
    Selection.Collapse wdCollapseEnd
    Selection.InsertBreak Type:=wdSectionBreakContinuous
  Next
End Sub

This macro inserts a section break at the end of each page of current document.

Method 3: Insert a Section Break on Each Page of Multiple Documents

  1. To begin with, put all target documents in the same folder.
  2. Then similarly, install and run macro with proper instructions.
  3. This time, use these codes:
Sub InsertBreaksIntoMultiDoc()
  Dim StrFolder As String
  Dim strFile As String
  Dim objDoc As Document
  Dim dlgFile As FileDialog
  Dim nTotalPageNumber As Integer
 
  Set dlgFile = Application.FileDialog(msoFileDialogFolderPicker)
 
  With dlgFile
    If .Show = -1 Then
      StrFolder = .SelectedItems(1) & "\"
    Else
      MsgBox "No folder is selected! Please select the target folder."
      Exit Sub
    End If
  End With
 
  strFile = Dir(StrFolder & "*.docx", vbNormal)
 
  While strFile <> ""
    Set objDoc = Documents.Open(FileName:=StrFolder & strFile)
    For nTotalPageNumber = 1 To Selection.Information(wdNumberOfPagesInDocument)
      Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=nTotalPageNumber
      Application.Browser.Target = wdBrowsePage
      ActiveDocument.Bookmarks("\page").Range.Select
      Selection.Collapse wdCollapseEnd
      Selection.InsertBreak Type:=wdSectionBreakContinuous
    Next
    objDoc.Save
    objDoc.Close
    strFile = Dir()
  Wend
End Sub
  1. The macro shall trigger the “Browse” window. Pick the folder where you keep documents and click “OK”.Choose a Folder->Click "OK"

The process shall take no more than a few seconds.

Handy Tool for Document Corruption

It’s a frustrating experience to encounter with damaged documents. In such scenario, a good and reliable tool that can help repair Word documents shall be able to relieve one’s anxiety a lot. Therefore, you need to be extremely cautious while choosing a repairing tool. An insufficient utility may cause further damage.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including Excel recovery and pdf repair software products. For more information visit www.datanumen.com

One response to “3 Ways to Quickly Insert Section Breaks into Your Word Document”

  1. Thanks for all your valuable information. I am wanting to add a next page section break in my document every time the characters “/86” (without the quote marks) appear. These characters are in the dates that are at the bottom of each page. Without the section break the document all runs together.
    Is there a macro or an easy way to achieve what I want to do?

Leave a Reply

Your email address will not be published. Required fields are marked *