How to split a mail merge into separate files

You have a completed template, a spreadsheet of 200 contacts, and a job to finish before the end of the day. You run a mail merge in Microsoft Word, expecting 200 individual files you can attach to emails or file away. Instead, Word finishes processing and hands you a single, massive 200-page document.

This happens because Microsoft Word's mail merge tool was originally built for a completely different era of office work. Its primary goal was to send a single, continuous print job to a physical printer. When you click "Edit Individual Documents," Word assumes you want to preview that print job on your screen. It strings every generated letter together into one continuous file, separating each record with a "Next Page" section break.

If you want to save each record as its own file, Word leaves you stranded. The built-in software does not offer a "save as separate files" button. To get your 200 individual documents, you have to find a workaround.

The three ways to split a mail merge today

Office workers generally rely on three methods to force Word to split a combined mail merge document into separate files. Each has a different cost in time, money, and risk to your computer.

1. Split the file manually

The most obvious approach is brute force. You open the massive combined document, highlight the first page, copy the text, open a new blank document, paste the text, and save the file with a specific name. Then you repeat the process 199 more times.

This is incredibly slow. A 200-row spreadsheet will easily take you two or three hours of mindless clicking. It is also highly error-prone. If you accidentally highlight slightly past the section break, you ruin the formatting. If you lose focus and type the wrong name when saving the file, you end up sending a confidential document to the wrong person.

2. Run a VBA macro

Visual Basic for Applications (VBA) is Microsoft’s programming language for Office. You can write a macro that loops through the combined document, cuts out each section, and saves it as a new file.

Here is a short, working VBA script that does exactly this. You run this macro from inside the massive document that Word produces after you click "Edit Individual Documents".

Sub SplitMailMerge()
    Dim i As Integer
    Dim singleDoc As Document
    Dim sourceDoc As Document
    
    Set sourceDoc = ActiveDocument
    Application.ScreenUpdating = False
    
    For i = 1 To sourceDoc.Sections.Count - 1
        sourceDoc.Sections(i).Range.Copy
        Set singleDoc = Documents.Add
        singleDoc.Range.Paste
        
        ' Remove the section break copied over
        singleDoc.Range.Find.Execute FindText:="^b", ReplaceWith:=""
        
        singleDoc.SaveAs2 FileName:="C:\MergeOutput\Document_" & i & ".docx"
        singleDoc.Close False
    Next i
    
    Application.ScreenUpdating = True
End Sub

Here is what the code does, line by line:

  • Set sourceDoc = ActiveDocument tells the script to look at your current massive document.
  • Application.ScreenUpdating = False stops your screen from flickering wildly as Word rapidly opens and closes files.
  • For i = 1 To sourceDoc.Sections.Count - 1 sets up a loop. Word separates your merged letters with section breaks, so the code counts the sections and goes through them one by one.
  • The middle lines copy the current section, open a completely blank document, paste the text in, and delete the invisible section break character (^b) that carried over.
  • singleDoc.SaveAs2 saves the file to a folder named "MergeOutput" on your C drive, naming it "Document_1.docx", "Document_2.docx", and so on.
  • singleDoc.Close False closes the new file without asking you to save changes again.

This method works, and it is free. However, running scripts you find on the internet is a security risk. Because malicious macros are a common way hackers attack networks, most corporate IT departments block VBA entirely. If you work in a medium or large company, the "Developer" tab in Word is likely disabled by policy, meaning you cannot use this fix.

3. Buy a paid add-in

If you cannot run macros and you refuse to copy-paste all afternoon, your third option is buying a third-party Word add-in. Several software companies sell plugins that attach themselves to Microsoft Word and add a "Merge to Individual Files" button to your ribbon.

These tools are usually reliable, but they cost money—often between $30 and $100 for a license, or they require an ongoing monthly subscription. Furthermore, you must install the software on your computer. Just like macros, corporate IT policies frequently block users from installing unauthorized third-party software, leaving you stuck.

How to generate separate files in your browser

You can skip Word entirely for the generation step. ManyDocs takes your existing Word document and your spreadsheet, and generates individual files directly in your web browser.

The software runs locally on your device. Your files are never uploaded to a server, keeping your confidential data secure. Best of all, generating separate files is the default behavior. You do not need macros, add-ins, or IT approval.

Here is how to generate your separate files:

  1. Prepare your template: Open Microsoft Word or LibreOffice. Instead of using Word's clunky mail merge fields, type simple placeholders into your text. You can use double parentheses ((FirstName)), double curly braces {{FirstName}}, or double square brackets [[FirstName]]. Save the file as a .docx or .odt.
  2. Prepare your spreadsheet: Open Excel. Ensure your first row contains column headers. These header names must perfectly match the placeholders in your template. If your template says ((FirstName)), your column header must be exactly FirstName. Save this as an .xlsx, .xls, or .ods file.
  3. Generate: Open ManyDocs in your browser. Drag and drop your template and your spreadsheet onto the page.
  4. Download: The tool processes one row at a time. A 300-row spreadsheet takes about a minute. When it finishes, you receive a single ZIP file containing all 300 separate documents.

Naming your output files automatically

When you split files using a basic macro, you usually get filenames like document-1.docx, document-2.docx, and document-3.docx. If you have 200 files, numbered naming is nearly useless. You have to open document-84.docx just to see whose contract it is.

ManyDocs lets you choose a specific spreadsheet column to name your resulting files. If you select a column containing employee names, your ZIP file will contain Sarah-Jenkins.docx and David-Chen.docx. This makes the batch immediately searchable and ready to file.

When naming files this way, you must watch out for two common pitfalls:

  • Illegal characters: Windows and Mac operating systems do not allow certain characters in file names. If your spreadsheet column contains slashes, colons, or question marks (for example, an invoice number like INV/2026/04), the operating system will reject the file name. Clean your spreadsheet column to remove characters like \ / : * ? " < > | before generating.
  • Duplicate values: If you choose a "First Name" column to name your files, and you have two people named "John" in your spreadsheet, the system will try to create John.docx twice. The second file will simply overwrite the first one, meaning you will lose a document. Always use a column with guaranteed unique values, like an Employee ID or an Invoice Number, or create a new column in Excel that combines first and last names.

A complete worked example

To see this in action, imagine you need to send personalized bonus confirmation letters to your staff.

First, you prepare your spreadsheet. You create a simple table where the headers match exactly what you intend to type into your Word document. You also add a column specifically designed to be the file name.

FirstName LastName BonusAmount FileNamingColumn
Michael Scott $5,000 Bonus-Scott-M
Pamela Beesly $2,500 Bonus-Beesly-P
Dwight Schrute $5,000 Bonus-Schrute-D
Stanley Hudson $1,000 Bonus-Hudson-S
Phyllis Vance $2,000 Bonus-Vance-P

Next, you create your Word template. You type your placeholders exactly as they appear in the spreadsheet headers.

CONFIRMATION OF ANNUAL BONUS

Dear {{FirstName}} {{LastName}},

We are pleased to confirm that your annual bonus has been approved. A total of {{BonusAmount}} will be included in your next scheduled payroll run.

Thank you for your hard work this year.

You drop both files into ManyDocs. In the settings, you tell the tool to use the FileNamingColumn for the output names.

A few seconds later, you download a ZIP file. When you extract it on your desktop, you see exactly five perfectly named files:

  • Bonus-Scott-M.docx
  • Bonus-Beesly-P.docx
  • Bonus-Schrute-D.docx
  • Bonus-Hudson-S.docx
  • Bonus-Vance-P.docx

Each file contains only that specific employee's letter, with their personal details cleanly substituted in the text.

When Word's built-in mail merge is still the better choice

Splitting files into individual documents is the right choice for contracts, employee letters, and personalized invoices. However, there are three specific scenarios where you should stick to Microsoft Word's default mail merge behavior.

  1. Printing address labels: If you are printing mailing labels on Avery sticker sheets, you want a single file. Word handles the complex page layout of putting 30 different addresses on a single piece of paper perfectly. You do not want 30 separate documents for this.
  2. Printing envelopes: Similar to labels, if you are feeding a stack of blank envelopes into a physical office printer, sending one continuous print job of 200 envelopes is much easier than opening and printing 200 separate files.
  3. Creating a directory or catalog: If you are building a staff telephone directory or a product catalog, you want all the records flowing down the same page in a single document. Word's "Directory" mail merge type does this well.

For everything else—any scenario where you intend to email the file as an attachment, upload it to a portal, or save it to a client's digital folder—separate files are the only logical choice.

Frequently asked questions

Does a mail merge upload my spreadsheet anywhere?

No. When you use a browser-based tool like ManyDocs, everything happens locally on your own computer. The tool uses JavaScript to parse your spreadsheet and template inside your browser window. Your files are never uploaded to a remote server, which keeps your data secure.

Which placeholder styles are supported?

You can use three different placeholder formats in your Word or OpenDocument templates: ((field)), {{field}}, or [[field]]. All three work identically. Pick one style and use it consistently throughout your document to avoid making mistakes.

Can I choose what my generated files are called?

Yes. Instead of getting files named document-1.docx, you can tell the software to look at a specific column in your spreadsheet. If you point it to a column containing invoice numbers, your output files will be named using those exact invoice numbers.

Why did I get a massive 500-page document instead of separate files?

This happens when you use Microsoft Word's default "Edit Individual Documents" button. Word strings every generated letter together separated by a section break, because it expects you to send the massive document directly to a physical printer.