logo
search
Formatting Issues

How to Create a Footer Only on the Last Page in Word

Elise WilliamsElise Williams Sep 28, 2026 873 views

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.

How to Create a Footer That Appears Only on the Last Page in Word
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 you start

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.

Solution 1Recommended

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.

1
Open Header & Footer

Double-click the bottom margin of any page in your document to open the Header & Footer editing mode.

2
Insert the outer IF field

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.

3
Insert PAGE and NUMPAGES fields

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

4
Add the desired text

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" }.

5
Update and hide field codes

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.

Use an IF Field Code to Create a Conditional Footer
Crucial Shortcut: You must use Ctrl+F9 to generate the field braces. Typing the curly brackets { } directly from your keyboard will render as standard text and the formula will not work.

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. 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. 2. Insert Field Codes: Press Ctrl+F9 to insert formula braces, and nest the {PAGE} and {NUMPAGES} parameters inside an IF statement.
  3. 3. Enter the Formula: Construct the formula to match: { IF { PAGE } = { NUMPAGES } "Last Page Content" }.
  4. 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.
Fully compatible with Microsoft Word field codes and .docx formatsIntuitive Header and Footer editing interfaceLightweight application with fast document loading speedsFree to use for everyday document creation and editing
microsoft office alternative - wps office

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.