Document Editing Problems

Fix Mail Merge Fields Displaying as Codes After Finish and Merge in Word

Chanuka GeekiyanageChanuka Geekiyanage Nov 2, 2026 872 views

Question details

Users need a way to correctly display merged data when mail merge fields incorrectly remain as raw field codes after completing a merge to individual documents.

How to Fix Mail Merge Fields Remaining as Codes After Finish and Merge
Product
Microsoft Word
Device & OS
Windows
Scenario
Executing a document mail merge via the 'Finish and Merge' > 'Edit Individual Documents' option.
Observed behavior
Instead of showing the actual data values, the fields remain gray or display the underlying field codes (e.g., { MERGEFIELD }), an issue often triggered by a recent Office update.
Before you start

Ensure you have saved a backup copy of both your original mail merge template document and your data source (like Excel) before running macros or altering Office installations.

Solution 1Recommended

Use a VBA Macro to Execute Merge and Unlink Fields

Run a simple Visual Basic for Applications (VBA) macro as a temporary workaround to bypass the update bug, forcing the merge to execute and converting the output fields to plain text.

Because this issue is frequently tied to a specific Microsoft Office update, standard merging methods may temporarily fail. Using VBA allows you to programmatically force the merge and unlink the fields so the final document displays static text instead of broken field codes.

1
Open the VBA Editor

With your mail merge document open in Word, press 'ALT + F11' on your keyboard to launch the Microsoft Visual Basic for Applications window.

2
Insert a New Module

Click on 'Insert' in the top menu bar and select 'Module' to open a new blank coding window.

3
Input the Macro Code

Type or paste the following two commands: 'ActiveDocument.MailMerge.Execute Pause:=False' and on the next line, 'ActiveDocument.Fields.Unlink'.

4
Run the Macro

Press 'F5' or click the 'Run' button at the top of the editor. This will execute the mail merge and immediately unlink the fields in the resulting document, displaying your data correctly.

Use a VBA Macro to Execute Merge and Unlink Fields
Preserving Templates: Unlinking fields converts them to normal text only in the newly generated output document. Your original merge template remains intact with its active fields.
Free Microsoft Office alternative

Perform Flawless Mail Merges with WPS Office

Tired of encountering update bugs and broken field codes in Microsoft Word? Switch to WPS Office for a free, lightweight, and highly compatible alternative that handles complex mail merges perfectly.

  1. 1. Install WPS Office: Download the free installation package from the official WPS website and complete the quick setup.
  2. 2. Open Your Merge Document: Launch WPS Writer and open your existing Word (.docx) mail merge template without losing any formatting.
  3. 3. Execute the Merge: Navigate to the Mailings tab, connect your data source, and merge your documents effortlessly without dealing with stuck field codes.
Fully compatible with Microsoft Word .docx templates and field codesSeamless Mail Merge functionality with Excel spreadsheets and external data sourcesLightweight architecture that avoids the recent update bugs found in Microsoft OfficeFamiliar ribbon interface ensuring a zero learning curve for new users
microsoft office alternative - wps office

Frequently Asked Questions

Why do my mail merge fields look like { MERGEFIELD Name } instead of the actual data?

You may have accidentally enabled the option to display field codes instead of their values. You can easily toggle this setting off and reveal the actual merged text by pressing 'Alt + F9' on your keyboard.

Does unlinking fields with VBA alter my original Excel data source?

No, using the VBA 'Fields.Unlink' command only removes the dynamic link in the final generated output document, turning the dynamic data into static text. Your original Excel database and Word template remain completely unaltered.

How do I check if my Windows operating system is 64-bit?

Click the Start button, go to Settings > System > About. Look under the 'Device specifications' section for 'System type', which will state whether you are running a 64-bit or 32-bit operating system.