Document Editing Problems

How to Use Mail Merge IF and SEQ Fields for Multiple Contacts in WPS Writer

Jason MillerJason Miller Nov 13, 2026 869 views

Question details

The user needs to create a letter for multiple contacts in WPS Writer and insert separators with a comma after the final name by using a multi-record mail merge with IF statements, SEQ fields, and bookmarks.

Product
WPS Writer
Device & OS
not provided
Scenario
Creating a personalized letter that lists multiple contacts from related records in one merged document, with separators between names and a comma after the final name.
Observed behavior
Combining IF statements, sequence fields, and bookmarks in a standard letter merge is unreliable because each record normally produces a separate page instead of one grouped letter.
Before you start

Prepare your data source with a grouping field, such as LetterID, that identifies which contacts belong to the same letter. Make sure field names are consistent and there are no blank contact rows, because blank rows can interrupt the sequence and separator logic.

Solution 1Recommended

Use a Catalog/Directory Mail Merge with IF and SEQ Fields in WPS Writer

Use this solution when each letter must combine multiple related contact rows into a single list and you need precise control over separators and the final comma.

A Catalog/Directory mail merge keeps related records together instead of generating one page per row. IF fields can compare grouping values between records, and SEQ fields can number the contacts so separators are inserted only between actual names.

1
Start a Catalog/Directory mail merge

Open WPS Writer, go to the Mailings tab, and click Mail Merge to launch the Mail Merge wizard. Choose Catalog or Directory as the document type so multiple related records can appear in one merged document.

2
Connect the data source

In the Mail Merge wizard, click Select Recipients and choose Use an Existing List. Select your spreadsheet or database file and confirm the sheet or table that contains one row per contact plus a grouping field such as LetterID.

3
Insert merge fields

Place the cursor where the contact list should appear. Use the Insert Merge Field option in the Mailings tab to add fields such as FirstName and LastName.

4
Add IF and SEQ fields

Go to Insert > Fields > More Fields to add SEQ fields that number each contact and IF fields that compare the current LetterID with the next or final LetterID. Set the IF field to insert a separator or comma only when the comparison condition is true.

5
Preview and complete the merge

Use Preview Results in the Mailings tab to check a sample letter. Then choose Merge to New Document or Merge to Printer to generate the final merged letters.

Preview before printing: Always preview several letters in the merged document to verify that separators appear between names and the final comma appears only after the last contact.
WPS Writer Mail Merge

Create a Multi-Contact Mail Merge Letter in WPS Writer

Set up a Catalog/Directory mail merge in WPS Writer and use IF and SEQ fields to combine multiple contacts into one letter with correct separators and a final comma. WPS Writer can open and save the same DOCX field-based documents you use in Microsoft Word.

  1. 1. Start the Mail Merge wizard: Open WPS Writer, click the Mailings tab, and select Mail Merge to launch the wizard.
  2. 2. Choose Catalog/Directory and connect data: Select Catalog or Directory as the merge type, click Select Recipients, and connect your spreadsheet or database with a grouping column such as LetterID.
  3. 3. Insert merge and conditional fields: Use Insert Merge Field to add contact fields, then open Insert > Fields > More Fields to add SEQ and IF fields that number contacts and control separators.
  4. 4. Preview and complete: Click Preview Results to check the separators and final comma, then choose Merge to New Document or Merge to Printer.
  5. 5. Save as DOCX: Save the merged document as a .docx file so it remains compatible with Microsoft Word.
Combines related contact records into one letter instead of one page per recordSupports IF, SEQ, and bookmark fields for separator and final-comma controlOpens and saves .docx files with Microsoft Word-compatible mail merge contentFree, lightweight, and familiar mail merge workflow for Word usersWorks with WPS Spreadsheets to prepare or aggregate contact data
QA img-9

Frequently Asked Questions

Can WPS Writer list multiple contacts from different rows in a single mail merge letter?

Yes. Use a Catalog/Directory mail merge from Mailings > Mail Merge and include a grouping field such as LetterID so related contact rows are combined into one letter.

Why does my IF field add a comma after the last contact?

The IF condition is likely matching the wrong record or evaluating the final row as if another contact follows. Compare the current record with the next or final record and preview several letters before completing the merge.

How do I insert SEQ and IF fields in WPS Writer?

Go to Insert > Fields > More Fields, choose the field you want, and then configure its condition or sequence properties. You can also press F9 to refresh field results after editing.

What data structure should I use for a multi-contact mail merge?

Use a table with one row per contact and a repeated grouping value such as LetterID, CustomerID, or CompanyID in each row that belongs to the same letter.

Can I save the merged WPS Writer document for Microsoft Word?

Yes. Save the document as .docx, and the merged letter remains compatible with Microsoft Word while preserving the mail merge result.