logo
search
Formatting Issues

How to Fix Word Showing PAGE Field Code Instead of Page Numbers

WPS EditorWPS Editor Oct 12, 2026 869 views

Question details

The user needs to display actual page numbers instead of raw field codes in headers and footers.

How to Fix Word Showing PAGE Field Code Instead of Page Numbers
Product
Microsoft Word
Device & OS
not provided
Scenario
Formatting document headers, footers, or page numbers for final viewing or printing.
Observed behavior
Word displays the field code { PAGE \* MERGEFORMAT } instead of showing the numerical page number value.
Before you start

Check if your keyboard requires pressing the 'Fn' (Function) key in combination with the F-keys, as the primary solution relies on a keyboard shortcut.

Solution 1Recommended

Toggle Field Codes Using a Keyboard Shortcut

This is the fastest and most direct way to switch back from viewing raw field codes to the actual page number values.

Microsoft Word has a built-in feature that lets you view the underlying codes that generate dynamic content like page numbers. If you accidentally trigger this view, your numbers will be replaced by text inside curly brackets.

1
Open your document

Navigate to the Word document where the { PAGE \* MERGEFORMAT } error is currently displayed in the header or footer.

2
Press Alt + F9

On your keyboard, press the 'Alt' and 'F9' keys simultaneously. If you are using a laptop, you may need to press 'Fn' + 'Alt' + 'F9'.

3
Verify the page numbers

Check your header or footer. The field code should now be replaced by the correct page number.

Toggle Field Codes Using a Keyboard Shortcut
Shortcut applied: Alt + F9 toggles all field codes in the entire document. If you only want to toggle a specific field, select it and press Shift + F9 instead.
WPS Office Writer

Manage Page Numbers Seamlessly with WPS Writer

WPS Writer provides an intuitive and user-friendly interface for formatting headers, footers, and page numbers, helping you avoid confusing field code errors while retaining full compatibility with Microsoft Word documents.

  1. 1. Open your document in WPS Writer: Launch WPS Office and open your existing Word document.
  2. 2. Access the Insert menu: Navigate to the 'Insert' tab on the top ribbon toolbar.
  3. 3. Add page numbers: Click on 'Page Number' and select your preferred alignment and style.
  4. 4. Format easily: Double-click the header or footer area at any time to visually edit the numbers without dealing with complex programming codes.
Free, lightweight, and fast word processing alternativeExcellent format compatibility with Microsoft Word (.docx)Intuitive header and footer editing without accidental field code triggersFamiliar user interface for a seamless transition
microsoft office alternative - wps office

Frequently Asked Questions

Why did my page numbers suddenly change to field codes?

This usually happens if you accidentally press the Alt + F9 keyboard shortcut, which toggles Word's display from showing field values (like page numbers) to showing the underlying programming codes (like { PAGE \* MERGEFORMAT }).

Will { PAGE \* MERGEFORMAT } show up when I print the document?

If your Word settings are configured to print field codes, they will appear on the printed page. You can prevent this by unchecking 'Print field codes instead of their values' in File > Options > Advanced > Print section.

What does MERGEFORMAT mean in the page field code?

The \* MERGEFORMAT switch tells Word to preserve any formatting (like font size, color, or bold text) you applied to the field result, even if the field is updated later.

Can I hide page numbers on the first page?

Yes. Double-click your header or footer to open the Header & Footer tab, then check the box for 'Different First Page'. You can then delete the page number on the first page without affecting the numbering on the rest of the document.