Skip to main content

How to Split a Word Document into Multiple Documents?

Author: Amanda Li Last Modified: 2025-01-09

If you have a large Word document that needs to be split into multiple smaller documents, this tutorial will guide you through three effective methods. Whether you prefer using VBA to split by a specific delimiter or by pages, or opting for the streamlined functionality of Kutools for Word, you’ll find a solution that suits your needs.


Split Word document by specified delimiter with VBA

Rather than manually splitting a document, you can use VBA to split a Word document by a specific delimiter. Follow these steps:

  1. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  2. Click Insert > Module, and paste the VBA code below into the module window.
    Sub SplitNotes(delim As String, strFilename As String)
    Dim doc As Document
    Dim arrNotes
    Dim I As Long
    Dim X As Long
    Dim Response As Integer
    arrNotes = Split(ActiveDocument.Range, delim)
    Response = MsgBox("This will split the document into " & UBound(arrNotes) + 1 & " sections. Do you wish to proceed?", 4)
    If Response = 7 Then Exit Sub
    For I = LBound(arrNotes) To UBound(arrNotes)
    If Trim(arrNotes(I)) <> "" Then
    X = X + 1
    Set doc = Documents.Add
    doc.Range = arrNotes(I)
    doc.SaveAs ThisDocument.Path & "\" & strFilename & Format(X, "000")
    doc.Close True
    End If
    Next I
    End Sub
    Sub test()
    'delimiter & filename
    SplitNotes "///", "Notes "
    End Sub
  3. Click the Run button or press F5 to execute the VBA.
  4. In the Microsoft Word pop-up, confirm by clicking Yes.

    Confirmation dialog

Notes:

  • The script will look for "///" (on line 22 of the code) within the document to identify the points where it should divide the text into separate files. If the delimiter in your document is different from "///", you must update the VBA code to reflect the correct delimiter or modify your document to include "///" at the desired split points.
  • You can replace "Notes" on line 22 of the code with any text to create a more meaningful filename prefix for your split documents.
  • The split documents will be saved in the same location as the original file.
  • No delimiter is needed at the end of the document; otherwise, a blank file will be created.

Split Word document by heading/page/section break/page break using Kutools for Word

Kutools for Word provides a more convenient and flexible way to split a document compared to manual methods or VBA. It offers multiple options to split a document by headings, pages, section breaks, page breaks, every n pages, or custom page ranges, allowing you to tailor the splitting process to your specific needs.

Kutools for Word, equipped with AI πŸ€–, offers over 100 handy features to simplify your tasks.
  1. Click Kutools Plus > Split to enable the Split feature.

    Split option on the Kutools Plus tab on the ribbon

  2. In the Split Document dialog, configure the following options:
    Kutools Split Document dialog box
    1. Choose a splitting method from the Split by drop-down list. Available options include heading 1, page breaks, section breaks, pages, every n pages, or custom page ranges.

      Split by options

    2. Click the Browse button Path selection button to select a destination folder for the split documents.
    3. Enter a keyword as the prefix for the new document names in the Document Prefix field. Tip: Clicking the Refresh button Refresh button can preivew the split document names in the Preview box.
    4. Click Ok.

The document will be split according to the specified method, and the new files will be saved to the designated folder.

Notes:

  • If splitting by Every n pages, specify the number in the relevant box.

    Split by Every n pages

  • For custom page ranges, input them separated by commas (e.g., 1,3-5,12).

    Custom Page Ranges

Kutools for Word is the ultimate Word add-in that streamlines your work and boosts your document processing skills. Get It Now!

Tabbed Browsing & Editing for Multiple Word Documents, Just Like in Chrome and Edge!

Just like browsing multiple webpages in Chrome, Safari and Edge, Office Tab lets you open and manage multiple Word documents in a single window. Switching between documents is now simple with a click on their tabs!
Try Office Tab for free now!

Browse multiple word documents in one window just like in Chrome


Split Word document by page with VBA

If you need to quickly split a Word document into multiple documents, each containing one page, you can use a VBA macro to automate this task. Follow the steps below:

  1. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  2. Click Insert > Module, then paste the following VBA code into the new module window:
    Sub SplitIntoPages()
    Dim docMultiple As Document
    Dim docSingle As Document
    Dim rngPage As Range
    Dim iCurrentPage As Integer
    Dim iPageCount As Integer
    Dim strNewFileName As String
    Application.ScreenUpdating = False 'Makes the code run faster and reduces screen flicker a bit.
    Set docMultiple = ActiveDocument 'Work on the active document
    Set rngPage = docMultiple.Range 'Instantiate the range object
    iCurrentPage = 1
    'Get the document's page count
    iPageCount = docMultiple.Content.ComputeStatistics(wdStatisticPages)
    Do Until iCurrentPage > iPageCount
        If iCurrentPage = iPageCount Then
            rngPage.End = ActiveDocument.Range.End 'Last page (no next page)
        Else
            'Find the beginning of the next page
            'Must use the Selection object. The Range.Goto method will not work on a page
            Selection.GoTo wdGoToPage, wdGoToAbsolute, iCurrentPage + 1
            'Set the end of the range to the point between the pages
            rngPage.End = Selection.Start
        End If
        rngPage.Copy 'Copy the page into the Windows clipboard
        Set docSingle = Documents.Add 'Create a new document
        docSingle.Range.Paste 'Paste the clipboard contents to the new document
        'Remove any manual page break to prevent a second blank
        docSingle.Range.Find.Execute Findtext:="^m", ReplaceWith:=""
        'Build a new sequentially numbered file name based on the original multi-paged file name and path
        strNewFileName = Replace(docMultiple.FullName, ".doc", "_" & Right$("000" & iCurrentPage, 4) & ".doc")
        docSingle.SaveAs strNewFileName 'Save the new single-paged document
        iCurrentPage = iCurrentPage + 1 'Move to the next page
        docSingle.Close 'Close the new document
        rngPage.Collapse wdCollapseEnd 'Go to the next page
    Loop 'Go to the top of the do loop
    Application.ScreenUpdating = True 'Restore the screen updating
    'Destroy the objects.
    Set docMultiple = Nothing
    Set docSingle = Nothing
    Set rngPage = Nothing
    End Sub
  3. Click the Run button or press F5 to execute the VBA.

Note: The split documents will be saved in the same location as the original file.


Related articles:


Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

πŸ€– Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...

πŸ“˜ Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...

✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...

βž• Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...

πŸ” Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...

⭐ Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...

🌍 Supports 40+ Languages: Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Kutools and Kutools Plus tabs on the Word Ribbon
πŸ‘‰ Want to try these features? Download Kutools for Word now! πŸš€
 

Best Office Productivity Tools

Kutools for Word - 100+ Tools for Word