Use Fields from Two Records in a Word Mail Merge
Question details
Place values from two consecutive records in alternating locations in a Word mail merge, and display a representative name or No Rep when the representative field is empty.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A mail merge document needs to combine fields from two records in one output layout.
- Observed behavior
- Names appear from the wrong record or are duplicated, and empty representative fields need a fallback value.
Check the column names and record order in the mail merge data source under Mailings > Edit Recipient List. Decide which values from each pair of consecutive records must appear in the output.
Store each record’s values before arranging them in the merge
Use SET fields to save values from the first record, advance with NEXT, and then use REF fields to place values from both records.
Word processes merge fields in document order. Once NEXT advances to the second record, the first record is no longer directly available, so save its values before the NEXT field.
The example uses data source columns named Name and Rep. Replace them with your actual column names and create every pair of field braces with the field shortcut rather than typing braces.
At the beginning of the merge layout, create fields equivalent to { SET FirstName { MERGEFIELD Name } } and { SET FirstRep { MERGEFIELD Rep } }. Create each field with Ctrl+F9 on Windows or Cmd+F9 on Mac, and insert each MERGEFIELD using Mailings > Insert Merge Field.
After the first two SET fields, insert { NEXT }, followed by { SET SecondName { MERGEFIELD Name } } and { SET SecondRep { MERGEFIELD Rep } }. Use distinct bookmark names so each record has its own stored values.
In the desired alternating locations, insert { REF FirstName }, { REF SecondName }, { IF "{ REF FirstRep }" = "" "No Rep" "{ REF FirstRep }" }, and { IF "{ REF SecondRep }" = "" "No Rep" "{ REF SecondRep }" }. Create the nested IF and REF field braces with the field shortcut. Use actual line or paragraph breaks wherever the layout needs them.
Select Mailings > Preview Results and move through the results. Check that the names come from consecutive records and that each empty Rep value displays No Rep; then use Mailings > Finish & Merge to create the output.

Edit Word-Compatible Documents with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working on Word-compatible documents. Open existing files and continue editing without rebuilding your documents; Microsoft Word-specific merge fields should be tested in Word.

Frequently Asked Questions
Why do both bookmarks show the same record?
Check the order of the fields: save the first record with SET before NEXT, then save the second record after NEXT. Use different bookmark names for each record and reference the appropriate name with REF.
How do I display No Rep when a representative field is empty?
Save the Rep merge field in a bookmark, then use an IF field such as { IF "{ REF FirstRep }" = "" "No Rep" "{ REF FirstRep }" }. Create the outer and nested field braces with the field shortcut.
Can I type the braces around Word fields?
No. Create field braces with Ctrl+F9 on Windows or Cmd+F9 on Mac. Insert data source fields through Mailings > Insert Merge Field.
How can I check which two records are being combined?
Check the order under Mailings > Edit Recipient List, then select Mailings > Preview Results and move through the merged output. Each layout using one NEXT field should be checked against its corresponding pair of consecutive records.




