Formatting Issues

How to Remove Empty Numbered List Items in a Word Mail Merge

Natalie TaylorNatalie Taylor Nov 3, 2026 869 views

Question details

The user needs to prevent blank paragraphs from appearing in automatically numbered lists when specific mail merge fields contain no data.

How to Remove Empty Numbered List Items in Word Mail Merge
Product
Word Processing
Device & OS
not provided
Scenario
Creating a mail merge document where some records have empty fields in an automatically numbered list.
Observed behavior
Empty merge fields result in blank numbered paragraphs, breaking the continuity and formatting of the automatic list numbering.
Before you start

Ensure your data source is correctly linked to your document and identify which specific merge fields are prone to containing blank or empty data.

Solution 1Recommended

Use Conditional IF Fields to Suppress Blank Items

By wrapping your merge fields in an IF statement, you can instruct the word processor to only insert the field and its paragraph break if data is actually present.

This method prevents the automatic numbering from advancing when a data field is completely empty. You must use the designated keyboard shortcut to insert the special field code braces; typing normal curly brackets manually will not work.

1
Insert Field Code Braces

Press Ctrl+F9 to insert an empty set of field braces { } into your document.

2
Set Up the IF Condition

Inside the braces, type the IF condition: IF { MERGEFIELD YourFieldName } <> "" ". Ensure you press Ctrl+F9 again to insert the inner braces for the MERGEFIELD.

3
Define the True Condition

Inside the true condition quotes, type the text or insert the field you want to display if it is not empty, followed by a paragraph break (press Enter).

4
Define the False Condition

Add the false condition as an empty string "" and close the field. Example: { IF { MERGEFIELD Item1 } <> "" "{ MERGEFIELD Item1 }[Enter]" "" }.

5
Apply Numbering and Execute

Apply automatic numbering to the resulting fields. Execute the merge to verify, as previewing may not display the final numbering correctly.

Use Conditional IF Fields to Suppress Blank Items
Field Code Spacing: Spaces within the field construction are critical. Ensure there is a space after 'IF' and around the operator '<>'.
Efficient Mail Merge

Use WPS Writer for Seamless Mail Merge and Document Formatting

WPS Writer offers a highly compatible and intuitive Mail Merge feature. You can easily insert fields, toggle field codes, and manage empty data sources without complex configurations.

  1. 1. Link Data Source: Open your document in WPS Writer, navigate to the 'Mailings' tab, and click 'Open Data Source' to link your spreadsheet.
  2. 2. Insert Fields: Use 'Insert Merge Field' to place your data into the document.
  3. 3. Apply Field Codes: Press Ctrl+F9 to wrap fields in IF statements to manage empty items as described in the solutions.
  4. 4. Merge to Document: Click 'Merge to New Document' to execute the merge and view perfect automatic numbering.
Fully compatible with Microsoft Word (.docx) formats and complex field codes.Intuitive Mail Merge interface for linking Excel spreadsheets or databases.Easily toggle field codes using familiar shortcuts like Alt+F9 and Ctrl+F9.Free to download with a lightweight, user-friendly design.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my numbered list show blank lines in the mail merge preview?

The Mail Merge 'Preview Results' feature often does not render automatic numbering and complex field conditions accurately. You must finish and execute the merge to a new document to see the final correct numbering.

Can I just type the curly brackets { } on my keyboard for IF fields?

No, typing standard curly brackets will not work. You must press Ctrl+F9 to insert the special field code braces recognized by the word processor.

What do the \b and \f switches do in a merge field?

The \b switch inserts specified text before the merge field, and the \f switch inserts text after the field, but only if the merge field is not empty. They are useful for adding spacing, punctuation, or manual numbering dynamically.