Document Editing Problems

How to Show Mail Merge Values for Selected Records in Word

Ayan MasoodAyan Masood Oct 29, 2026 869 views

Question details

The user needs to conditionally display specific mail merge values based on specific record descriptions, particularly when dealing with one-to-many data structures where standard SKIPIF or NEXT commands fail inside Table blocks.

How to Show Mail Merge Values for Selected Records in Word
Product
Word
Device & OS
not provided
Scenario
Setting up a complex mail merge document that requires conditional logic to display values only when the record description equals specific criteria.
Observed behavior
Standard mail merge fields like SKIPIF, NEXTIF, and NEXT do not provide a straightforward way to skip records inside a TableStart and TableEnd block for one-to-many data structures.
Before you start

Ensure your data source (such as an Excel spreadsheet) is accurately categorized and filtered before initiating the mail merge, as preparing your data in advance simplifies conditional merging.

Solution 1Recommended

Use IF Fields for Conditional Mail Merge Display

Apply standard Word IF fields to display values only when specific text conditions are met.

Standard SKIPIF fields are often problematic for skipping records within complex structures and must be placed at the very beginning of the document. Instead, using multiple IF fields is the most reliable way to display specific contents conditionally.

1
Insert Field Braces

Press Ctrl + F9 on your keyboard to insert a pair of empty field braces { } into your Word document.

2
Enter the First Condition

Inside the braces, type your first IF statement to check for condition A: IF { MERGEFIELD Description } = "A" "{ MERGEFIELD Value }" "".

3
Enter the Second Condition

Immediately after the first statement, press Ctrl + F9 again and type the condition for B: IF { MERGEFIELD Description } = "B" "{ MERGEFIELD Value }" "".

4
Preview Results

Right-click the fields and select 'Update Field', then click 'Preview Results' on the Mailings tab to verify that the values display conditionally.

Use IF Fields for Conditional Mail Merge Display
Nested Field Formatting: Do not type the curly braces { } manually using the keyboard. You must generate them using Ctrl + F9 for the field codes to be recognized properly.
Advanced Mail Merge Integration

Handle Mail Merge Conditionally with WPS Writer

WPS Writer offers a comprehensive Mail Merge feature that fully supports complex field codes like IF, NEXT, and SKIPIF, allowing you to seamlessly connect to Excel data sources and build conditional documents.

  1. 1. Open Mail Merge Tab: Launch WPS Writer, open your document, and navigate to the 'References' or 'Mailings' tab on the top ribbon.
  2. 2. Connect Data Source: Click 'Open Data Source' to link your prepared Excel spreadsheet containing your conditional records.
  3. 3. Insert Merge Fields: Use the 'Insert Merge Field' button to place your standard fields, or press Ctrl+F9 to type out manual IF field codes.
  4. 4. Preview and Merge: Click 'View Merged Data' to preview your conditional logic, then select 'Merge to New Document' to generate the final file.
100% compatible with Microsoft Word document formats (.docx).Supports complex mail merge field codes including IF conditions.Seamless integration between WPS Writer and WPS Spreadsheet.Free, lightweight, and user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

What does the SKIPIF field do in a mail merge?

The SKIPIF field instructs the application to skip the current data record and move to the next one if a specific condition is met. However, if used, it typically must be the first field in the mail merge main document to function correctly.

Can I use multiple conditions in a single IF field?

Standard mail merge IF fields are relatively simple and do not natively support complex 'OR' operators gracefully. The standard workaround is to place multiple separate IF fields sequentially, such as one for condition A and another immediately following it for condition B.

Why doesn't mail merge work well with one-to-many relationships?

Standard mail merge is designed for flat data, meaning one data record per document or page. To handle one-to-many structures (like generating an invoice with multiple varying line items), you generally need third-party add-ins or must pre-process the relationships into flat columns in Excel.