Why Ctrl+U Adds MERGEFORMAT to a Word Cross-Reference
Question details
The user wants to understand why underlining a cross-reference using the Ctrl+U shortcut preserves formatting by adding a MERGEFORMAT switch, whereas using the Home tab button causes the underline to disappear when the field is updated.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Applying underline formatting to a cross-reference field in a document.
- Observed behavior
- Formatting applied via the ribbon Underline button is lost upon updating the field, but pressing Ctrl+U retains the underline because Word automatically appends the MERGEFORMAT switch to the field code.
Ensure your document's field codes are visible by pressing Alt+F9, which allows you to directly view the REF field syntax before modifying the formatting switches.
Apply the CHARFORMAT Switch to Preserve Formatting
Manually adding the CHARFORMAT switch is the most reliable way to ensure that the exact character formatting applied to the field code is carried over to the updated result.
While MERGEFORMAT attempts to retain formatting on updated results, it can sometimes be inconsistent. The CHARFORMAT switch forces the entire field result to inherit the exact formatting applied to the first character of the field name (e.g., the 'R' in REF).
Press Alt+F9 (or Fn+Alt+F9 on certain laptops) to toggle the display from field results to field codes throughout your document.
Find the specific REF field you want to underline. It will look similar to { REF _Ref12345678 }.
Click inside the bracket and type \* CHARFORMAT at the end of the code, so it reads { REF _Ref12345678 \* CHARFORMAT }.
Highlight the letter 'R' in 'REF' and apply your desired underline formatting from the Home tab or by pressing Ctrl+U.
Press Alt+F9 to hide the field codes, then select the cross-reference text and press F9 to update it. The underline will now remain permanently.

Use the Ctrl+U Shortcut for Automatic MERGEFORMAT
If you prefer a quick formatting fix without manually editing field codes, simply use the keyboard shortcut to trigger Word's built-in MERGEFORMAT behavior.
Manage Cross-References and Field Codes Easily in WPS Writer
WPS Writer provides robust, highly compatible support for advanced field codes, allowing you to insert, format, and manage cross-references seamlessly without losing your document styles.
- 1. Open your Document in WPS Writer: Launch WPS Office and open the .docx file that contains your cross-references.
- 2. Toggle Field Codes: Right-click the specific cross-reference and select 'Toggle Field Codes', or press Alt+F9 to reveal all codes in the document.
- 3. Apply Formatting Switches: Add the \* CHARFORMAT switch at the end of your REF field and format the first character to preserve styling.
- 4. Update the Field: Select the field and press F9 to update the results. Your customized formatting will be preserved perfectly.

Frequently Asked Questions
What is the MERGEFORMAT switch in Word?
The MERGEFORMAT switch (\* MERGEFORMAT) is an instruction added to a field code that tells the word processor to preserve the manual formatting applied to the field results whenever the field updates.
What is the difference between MERGEFORMAT and CHARFORMAT?
MERGEFORMAT attempts to retain the formatting of the previous field result on a block-by-block basis, which can sometimes fail. CHARFORMAT is more reliable for character-level styling; it applies the exact font and styling of the very first letter inside the field code (like the 'R' in REF) to the entire updated field result.
Why do my underlined cross-references lose their underline when printing?
Printing typically forces the document to update all its fields before sending data to the printer. If the underline was applied via the ribbon without a MERGEFORMAT or CHARFORMAT switch present in the code, the update strips the manual formatting.
How do I view the field codes instead of the text in my document?
You can toggle the display of all field codes by pressing Alt+F9. To toggle a single, specific field without affecting the rest of the document, select the field and press Shift+F9.




