How to Create a Footer Only on the Last Page in Word
Question details
The user needs to display specific footer content, such as a signature block or final remark, exclusively on the last page of a document that has a variable page length.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Adding a signature block or template building block that automatically detects and prints only on the final page of a report without manually inserting section breaks.
- Observed behavior
- Instead of applying the same footer to every page, the document requires a dynamic condition that compares the current page with the total page count to conditionally render the footer text.
Before applying this formatting, ensure your document does not contain complex section breaks that restart page numbering, as this solution relies on the total document page count accurately matching the sequential page number.
Use an IF Field Code to Create a Conditional Footer
This method uses Word's built-in field codes to dynamically compare the current page number to the total page count, displaying specific text only when they match.
By nesting field codes, you can create a logic statement directly inside your footer. When the document updates, the IF statement checks if the current page is equal to the total number of pages in the document. If true, it displays your desired text or building block.
Double-click the bottom margin of any page in your document to open the Header & Footer editing mode.
Press Ctrl+F9 to insert a pair of field braces. Inside these braces, type 'IF ' (with a trailing space). Do not type the curly brackets manually.
While inside the first set of braces, press Ctrl+F9 again and type 'PAGE'. Click outside the PAGE braces, type ' = ', press Ctrl+F9 again, and type 'NUMPAGES'.
After the NUMPAGES braces, add a space and type your desired last-page text wrapped in quotation marks. The complete syntax should look like: { IF { PAGE } = { NUMPAGES } "This is the last page" }.
Press Alt+F9 to toggle off the field code display, then press F9 to update the fields. Your text will now only appear on the final page.

Easily Manage Dynamic Footers in WPS Writer
WPS Writer offers full compatibility with standard word processing field codes, making it simple to create dynamic footers, conditional page elements, and professional document layouts without hassle.
- 1. Enter Footer Mode: Open your document in WPS Writer and double-click the bottom margin of the page to enter Footer editing mode.
- 2. Insert Field Codes: Press Ctrl+F9 to insert formula braces, and nest the {PAGE} and {NUMPAGES} parameters inside an IF statement.
- 3. Enter the Formula: Construct the formula to match: { IF { PAGE } = { NUMPAGES } "Last Page Content" }.
- 4. Apply and View: Right-click the formula and select 'Toggle Field Codes', or press F9 to update. The footer will dynamically appear only on the final page.

Frequently Asked Questions
Why is my footer showing the curly bracket formula instead of the actual text?
You likely have field codes toggled on to display the underlying code rather than the result. Simply press Alt+F9 (or Fn+Alt+F9 on some laptops) to toggle the view from field codes back to their standard text output.
Can I insert an image or a complex signature block instead of just plain text?
Yes. Instead of typing plain text inside the quotation marks, you can insert an autotext entry, a quick part, or a template building block reference that contains your image and specific signature formatting.
Why isn't my IF formula working even though the text looks exactly right?
The most common reason for a failing field code is typing the curly braces manually using the keyboard. You must generate functional field braces by pressing Ctrl+F9. Keyboard-typed braces will be treated as normal text by the word processor.




