How to Use MERGEFORMAT and CHARFORMAT Switches in Word
Question details
The user needs to understand how to preserve formatting when updating field results in Word, specifically using the MERGEFORMAT and CHARFORMAT switches.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Updating fields or cross-references where the formatting changes unexpectedly.
- Observed behavior
- When updating a field, Word either loses the applied formatting or fails to adopt the formatting at the insertion point.
Before modifying field switches, ensure your document fields are visible by pressing Alt + F9 to toggle field codes on.
Preserve Field Result Formatting with MERGEFORMAT
Use this switch when you want to keep any manual formatting applied to the field result after it updates.
The MERGEFORMAT switch ensures that formatting applied manually to the result of a field is not lost when you refresh or update the document fields. Word often adds this by default if 'Preserve formatting during updates' is checked.
Select the text containing the field and press Alt + F9 on your keyboard to reveal the underlying field code.
Ensure the code ends with \* MERGEFORMAT. If it is missing, type it manually right before the closing brace (}).
Press Alt + F9 again to hide the code, then press F9 to update the field result and lock in your formatting.

Apply Insertion Point Styles with CHARFORMAT
Use this switch to force a field (like a cross-reference) to adopt the formatting of the surrounding text or the first character of the field code.
Manage Document Fields Seamlessly in WPS Writer
WPS Office provides full support for advanced document fields and switches, ensuring complete compatibility with Microsoft Word formatting rules. You can easily insert, update, and manage field codes to maintain perfectly formatted documents.
- 1. Open document: Launch WPS Writer and open your .docx document containing the fields.
- 2. Edit field codes: Press Alt + F9 to reveal the field codes and manually add or adjust your MERGEFORMAT or CHARFORMAT switches.
- 3. Update results: Right-click the field and select 'Update Field', or simply press F9 to apply your formatting changes.

Frequently Asked Questions
Why does my cross-reference change font size when updated?
This happens if the source text formatting overrides the destination formatting. To prevent this, edit the cross-reference field code and replace the MERGEFORMAT switch with the CHARFORMAT switch to lock it to the current paragraph's style.
What happens if I remove both MERGEFORMAT and CHARFORMAT?
If neither switch is present, the field result will adopt the exact formatting of the source data every time the field is updated, discarding any manual formatting you applied locally to the field result.
How do I turn on 'Preserve formatting during updates' by default?
When inserting a field via the Insert > Field dialog box, check the box labeled 'Preserve formatting during updates'. This will automatically append the \* MERGEFORMAT switch to your newly created field code.




