How to Fix Word Showing PAGE Field Code Instead of Page Numbers
Question details
The user needs to display actual page numbers instead of raw field codes in headers and footers.

- 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.
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.
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.
Navigate to the Word document where the { PAGE \* MERGEFORMAT } error is currently displayed in the header or footer.
On your keyboard, press the 'Alt' and 'F9' keys simultaneously. If you are using a laptop, you may need to press 'Fn' + 'Alt' + 'F9'.
Check your header or footer. The field code should now be replaced by the correct page number.

Disable Field Codes in Word Options
Use this method if the keyboard shortcut doesn't work or if Word consistently opens documents showing field codes by default.
Reinsert the Page Numbers
If the field code is broken or not updating, deleting and reinserting the page number will generate a fresh, working field.
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. Open your document in WPS Writer: Launch WPS Office and open your existing Word document.
- 2. Access the Insert menu: Navigate to the 'Insert' tab on the top ribbon toolbar.
- 3. Add page numbers: Click on 'Page Number' and select your preferred alignment and style.
- 4. Format easily: Double-click the header or footer area at any time to visually edit the numbers without dealing with complex programming codes.

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.




