How to Fix Word Mail Merge Fields Showing Names When Printing
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.

- 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.
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.
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.
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.
Double-click the top margin of your document to open the Header area.
Navigate to Insert > Quick Parts > Field. In the Field names list, scroll down and select 'StyleRef'.
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.

Remove Fields from Shapes or Text Boxes
Merge fields placed inside floating shapes or text boxes often fail to render during printing. Moving them to the main document layer resolves the issue.
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. Open your document: Launch WPS Writer and open your template document. Navigate to the 'References' tab on the top ribbon.
- 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. 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. Merge and print: Click 'Merge to Printer' or 'Merge to New Document' to generate your final output with all fields perfectly populated.

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.




