ThisCalculator

Everyday

Split Word Document by Heading: How To

Updated · Standard formula, shown below

Split Word Document by Heading: How To

This article explains how to split a Microsoft Word document into separate files based on its heading structure, and it covers the methods that work in current versions of Word for Windows and Mac. You can split a document by heading using Word’s built-in outline view, a macro, or by copying sections manually, and the best choice depends on how many files you need and how often you do it.

Why Split a Word Document by Heading?

Splitting a long document into smaller files is useful when you need to send individual chapters to different reviewers, upload sections to a content management system, or reduce file size for email. A document with clear heading styles is much easier to split than one where formatting was applied manually. Word’s heading styles (Heading 1, Heading 2, etc.) create a logical structure that both the built-in navigation pane and the splitting methods rely on.

For example, a 200-page thesis with 12 chapters, each starting with a Heading 1, can be split into 12 separate documents in a few minutes. If you only need to split once, the manual copy-and-paste method is fine. If you split documents regularly, a macro will save time.

Method 1: Using the Navigation Pane (Manual)

This is the simplest method and works in Word 2010 and later on Windows, and Word 2016 and later on Mac. It does not require any coding.

  1. Open the document in Word.
  2. Go to the View tab and check the Navigation Pane box (on Mac, it’s under the View menu).
  3. Click on the Headings tab in the pane that appears on the left.
  4. Click on the first heading you want to split at (e.g., Chapter 1). Word will jump to that location.
  5. Press Ctrl+Shift+End (Windows) or Cmd+Shift+Down Arrow (Mac) to select from the cursor to the end of the document.
  6. Copy the selection (Ctrl+C / Cmd+C).
  7. Create a new blank document (File > New > Blank Document).
  8. Paste the content (Ctrl+V / Cmd+V).
  9. Save the new file with a descriptive name.
  10. Return to the original document, select the content you just copied, and delete it. Repeat from step 4 for the next heading.

This method works but is tedious for more than a few sections. It also requires you to be careful not to accidentally delete the wrong part.

Method 2: Using a Macro (Automated)

A macro is a small program that automates repetitive tasks. The following macro will split a document into separate files at each Heading 1. It is provided for educational purposes; you should test it on a copy of your document first.

  1. Press Alt+F11 (Windows) or Option+F11 (Mac) to open the Visual Basic for Applications (VBA) editor.
  2. Go to Insert > Module.
  3. Paste the following code:
Sub SplitByHeading1()
    Dim doc As Document
    Dim rng As Range
    Dim i As Long
    Dim startPos As Long
    Dim endPos As Long
    Dim fileName As String
    Dim folderPath As String
    
    Set doc = ActiveDocument
    folderPath = doc.Path & "\"
    
    ' Find all Heading 1 paragraphs
    For i = doc.Paragraphs.Count To 1 Step -1
        If doc.Paragraphs(i).Style = doc.Styles(wdStyleHeading1) Then
            ' Create a new document from this heading to the next heading
            Set rng = doc.Range(doc.Paragraphs(i).Range.Start, doc.Paragraphs(i).Range.End)
            ' Extend to the end of the document or next Heading 1
            If i < doc.Paragraphs.Count Then
                ' Find next Heading 1
                For j = i + 1 To doc.Paragraphs.Count
                    If doc.Paragraphs(j).Style = doc.Styles(wdStyleHeading1) Then
                        endPos = doc.Paragraphs(j).Range.Start - 1
                        Exit For
                    End If
                Next j
                If endPos = 0 Then endPos = doc.Content.End
            Else
                endPos = doc.Content.End
            End If
            Set rng = doc.Range(doc.Paragraphs(i).Range.Start, endPos)
            ' Copy to new document
            rng.Copy
            Set newDoc = Documents.Add
            newDoc.Content.Paste
            ' Save as .docx
            fileName = folderPath & "Section_" & i & ".docx"
            newDoc.SaveAs2 FileName:=fileName, FileFormat:=wdFormatXMLDocument
            newDoc.Close
        End If
    Next i
    MsgBox "Done"
End Sub
  1. Press F5 to run the macro. It will save each section as a new file in the same folder as the original document.

This macro is a starting point; you may need to adjust it for your specific heading levels (e.g., Heading 2) or file naming preferences. Always run it on a copy of your document.

Method 3: Using the Outline View (Alternative)

Word’s Outline view (View > Outline) lets you see the document’s structure. You can select an entire heading and its subheadings by clicking the plus sign next to the heading. Then copy and paste into a new document as in Method 1. This is slightly faster than the Navigation Pane because you can select a whole section in one click, but it still requires manual copying and pasting for each section.

How to Choose the Right Method

  • One-time split, fewer than 5 sections: Use the Navigation Pane method.
  • One-time split, many sections: Use the Outline view method to speed up selection.
  • Recurring need (e.g., monthly reports): Use a macro to automate the process.
  • Need to preserve exact formatting: All methods preserve formatting if you paste with the “Keep Source Formatting” option (default).

Common Problems and How to Avoid Them

  • Headings not recognized: The methods rely on Word’s built-in heading styles. If you used bold text or a different font size instead of Heading styles, the Navigation Pane won’t show them. Fix: Apply the Heading 1 style to your section titles.
  • Losing page numbers or headers/footers: When you copy content to a new document, headers and footers are not copied. You will need to re-add them to each new file.
  • Macro errors: If the macro fails, it may be because the document contains tracked changes or comments. Accept all changes and remove comments before running the macro.
  • File names conflicting: The macro above names files “Section_1.docx”, “Section_2.docx”, etc. If you have more than 9 sections, the numbering may not sort correctly in File Explorer. Use a naming scheme with leading zeros (e.g., “Section_01.docx”) if needed.

Frequently Asked Questions

Can I split a PDF by heading?

No, PDFs do not have Word heading styles. You would need to split a PDF by page or by bookmarks, which requires a PDF editor. The methods in this article only apply to Word documents.

Will splitting a Word document break my table of contents?

Yes, each new document will not have the original table of contents. You will need to generate a new table of contents in each split file if needed.

Can I split by Heading 2 instead of Heading 1?

Yes, you can modify the macro to use wdStyleHeading2 instead of wdStyleHeading1. The manual methods also work with any heading level.

Does this work in Word Online (free web version)?

Word Online does not support macros, and the Navigation Pane is not available. You can still manually copy sections, but it is not practical for large documents. Use the desktop version of Word.

What if my document has no headings at all?

You must first apply heading styles to the section titles. Select each title, then choose “Heading 1” from the Styles gallery. This is a prerequisite for all the methods above.

Can I split a document into separate PDF files?

You can split the Word document first, then save each new Word file as a PDF using File > Save As and choosing PDF.

Final Thoughts

Splitting a Word document by heading is straightforward if you use Word’s built-in heading styles. For occasional splits, the Navigation Pane is sufficient. For frequent splitting, a macro is worth the initial setup. Always work on a copy of your document to avoid accidental data loss.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.