Formatting Issues

Why Ctrl+U Adds MERGEFORMAT to a Word Cross-Reference

Huda QurayshiHuda Qurayshi Oct 16, 2026 869 views

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.

Why Ctrl+U Adds MERGEFORMAT to a Word Cross-Reference
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.
Before you start

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.

Solution 1Recommended

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).

1
Reveal Document Field Codes

Press Alt+F9 (or Fn+Alt+F9 on certain laptops) to toggle the display from field results to field codes throughout your document.

2
Locate the Cross-Reference Field

Find the specific REF field you want to underline. It will look similar to { REF _Ref12345678 }.

3
Add the CHARFORMAT Switch

Click inside the bracket and type \* CHARFORMAT at the end of the code, so it reads { REF _Ref12345678 \* CHARFORMAT }.

4
Format the First Character

Highlight the letter 'R' in 'REF' and apply your desired underline formatting from the Home tab or by pressing Ctrl+U.

5
Update the Field

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.

Apply the CHARFORMAT Switch to Preserve Formatting
Formatting Locked: Using CHARFORMAT guarantees your styling stays intact even when the document is printed or fully refreshed.

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. 1. Open your Document in WPS Writer: Launch WPS Office and open the .docx file that contains your cross-references.
  2. 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. 3. Apply Formatting Switches: Add the \* CHARFORMAT switch at the end of your REF field and format the first character to preserve styling.
  4. 4. Update the Field: Select the field and press F9 to update the results. Your customized formatting will be preserved perfectly.
Full compatibility with Microsoft Word .docx formats and field codes (including REF, MERGEFORMAT, and CHARFORMAT)Intuitive user interface for inserting accurate cross-referencesFree and lightweight software that guarantees smooth document handlingReliable formatting retention during document printing and exporting
microsoft office alternative - wps office

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.