logo
search
Printing Problems

How to Fix Word Mail Merge Fields Showing Names When Printing

Ayan MasoodAyan Masood Sep 27, 2026 869 views

Question details

Users experience mail merge fields displaying as field codes or names instead of the actual merged data when printing or saving the document to PDF.

Fix Word Mail Merge Fields Showing Names When Printing
Product
Word
Device & OS
not provided
Scenario
Printing or exporting a mail merged document that contains fields located inside headers, shapes, or text boxes.
Observed behavior
The fields display correctly on the screen but revert to showing raw field names or codes (e.g., «FirstName») on the printed page or the generated PDF file.
Before you start

Preview your document using the Print Preview feature (Ctrl+P) before actually printing to verify if the merge fields are populated with the correct data.

Solution 1Recommended

Use a StyleRef Field for Header Information

Replace MergeFields inside headers with StyleRef fields to reliably repeat merged data across pages without triggering printing errors.

Mail merge fields placed directly inside headers or footers can become disconnected from the data source during the print rendering process. The StyleRef field works around this by looking at the main document text for a specific style and reflecting that text in the header.

1
Apply a style to the source text

In the main body of your document, highlight the merged field you want to repeat in the header and apply a specific, unique text style (e.g., Heading 4) from the Home tab.

2
Open Header & Footer tools

Double-click the top margin of your document to open the Header area.

3
Insert the StyleRef field

Navigate to Insert > Quick Parts > Field. In the Field names list, scroll down and select 'StyleRef'.

4
Link the style

Under Field properties, choose the specific style you applied in Step 1 (e.g., Heading 4) and click OK. The header will now automatically display whatever data populates that styled field.

Use a StyleRef Field for Header Information
Letterhead Consistency: This method is highly recommended for multi-page letters or invoices where recipient details need to appear consistently on every page.
Flawless Mail Merge

Create Error-Free Mail Merges with WPS Writer

Avoid printing bugs and layout issues by using the built-in Mail Merge feature in WPS Writer. It easily connects to your data sources and accurately prints fields across headers, footers, and complex layouts.

  1. 1. Open your document: Launch WPS Writer and open your template document. Navigate to the 'References' tab on the top ribbon.
  2. 2. Connect data source: Click on 'Mail Merge' and select 'Open Data Source' to import your recipient list from an Excel spreadsheet or database.
  3. 3. Insert merge fields: Place your cursor where you want the data to appear, click 'Insert Merge Field', and select the corresponding column name from your data.
  4. 4. Merge and print: Click 'Merge to Printer' or 'Merge to New Document' to generate your final output with all fields perfectly populated.
Accurately prints merge fields without reverting to field namesFully compatible with Microsoft Word documents (.docx) and Excel data sources (.xlsx)Intuitive Mail Merge wizard for fast setup and previewFree and lightweight office alternative with a familiar user interface
microsoft office alternative - wps office

Frequently Asked Questions

Why do I see { MERGEFIELD Name } instead of the actual data on my screen?

You likely have the 'Show field codes instead of their values' setting enabled. You can quickly toggle between displaying the field codes and the actual merged data by pressing Alt+F9 on your keyboard.

Does saving as PDF fix the mail merge display issue in headers?

No, saving or exporting as a PDF uses the same rendering engine as printing. If the fields are incorrectly displaying as names during print preview, they will also show up as names in the exported PDF. You need to adjust the layout or use StyleRef fields first.

How do I update all fields in my document at once before printing?

To force all fields in your document to refresh and pull the latest data, press Ctrl+A to select the entire document, and then press the F9 key.