Document Editing Problems

Fix Word Mail Merge Error: Selection Does Not Consist of Heading Levels

Camila MilosovichCamila Milosovich Oct 26, 2026 868 views

Question details

The user needs to split a Word mail merge output into separate documents but is encountering a heading levels error.

How to Fix "Selection Does Not Consist of Heading Levels" Error in Word Mail Merge
Product
Microsoft Word
Device & OS
not provided
Scenario
Attempting to merge Excel data into Word and split the merged output into individual files using Outline view.
Observed behavior
Word displays the error message 'Selection does not consist of heading levels,' and the files fail to split even when Heading 1 or Heading 2 styles are manually applied.
Before you start

Ensure your main mail merge document is fully set up and successfully linked to your Excel data source before attempting to split the merged results.

Solution 1Recommended

Use a VBA Macro to Split Mail Merge Output

Since Microsoft Word does not natively support saving mail merge results into separate individual files from the standard menu, running a VBA macro is the most reliable workaround.

The Outline view workaround often fails because mail merge documents typically lack the precise continuous heading structure Word expects for subdocuments. Using a VBA script bypasses this limitation by explicitly telling Word to save each section as a new file.

1
Complete the Mail Merge

Go to the Mailings tab, click 'Finish & Merge', and select 'Edit Individual Documents' to generate a single document containing all your merged letters.

2
Open the VBA Editor

Press 'Alt + F11' on your keyboard to open the Visual Basic for Applications (VBA) window.

3
Insert a New Module

Click 'Insert' in the top menu and select 'Module'. Paste a standard mail merge splitting macro code (often provided in official MVP tips and tricks guides) into the blank window.

4
Run the Macro

Press 'F5' or click the 'Run' button. The macro will typically prompt you for a folder destination and then automatically split and save each letter as an individual Word document.

Use a VBA Macro to Split Mail Merge Output
Finding VBA Code: If you do not know how to write code, search online for 'Word VBA macro split mail merge'. Microsoft MVPs provide pre-written scripts that you can simply copy and paste.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

If dealing with complex VBA macros and unexpected MS Word errors is slowing down your workflow, consider switching to WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative to Microsoft Word.

  1. 1. Open Your Document: Launch WPS Writer and open the template document you wish to use for your letters.
  2. 2. Access Mail Merge: Navigate to the 'References' tab on the top ribbon and click on 'Mail Merge'.
  3. 3. Connect Your Data: Click 'Open Data Source' to link your Excel spreadsheet, insert your merge fields, and complete your bulk document generation smoothly.
Fully compatible with Microsoft Word formats, including .docx and .doc filesIncludes a built-in, easy-to-use mail merge wizard to connect Excel data effortlesslyLightweight software that opens complex documents rapidly without lagFamiliar tabbed interface makes migrating from Microsoft Office seamless
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get the 'Selection does not consist of heading levels' error during mail merge?

This error occurs when users attempt a workaround using Word's Outline view to split merged documents into subdocuments. Word's Outline feature requires specific hierarchical heading structures, which usually conflict with the layout of standard mail merge letters.

Can I save a mail merge as separate documents natively without using VBA?

No, the standard Microsoft Word mail merge feature only allows merging to a single continuous document, a printer, or directly into emails. Saving to separate individual files natively requires either a VBA macro or a third-party add-in.

Does applying a Heading 1 style fix this specific mail merge error?

Usually, no. Even if you manually apply Heading 1 or Heading 2 styles to your document, the Outline view splitting method often fails due to underlying limitations in how Word processes sections and page breaks in merged outputs.

How do I access the VBA editor to run a split macro in Word?

You can access the Visual Basic for Applications (VBA) editor by opening your Word document and pressing 'Alt + F11' on your keyboard. From there, you can insert a module and paste your macro code.