Word.Tips.Net WordTips (Menu Interface)

Using Last-page Headers and Footers

Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Using Last-page Headers and Footers.

Often it is desirable to insert something in the header or footer that you only want to appear on the last page. Word can be tricked into doing this because the number of pages in a document only equals the page number on the last page of a document! The header or footer can still contain information that you want printed on every page, but this field prints the document name and path on the final page footer only.

{ IF { PAGE } = { NUMPAGES } { FILENAME \p} }

If you want to print one footer on every page, but a different footer on the last page, you can do so by modifying this slightly. For instance, the following will print the filename on the last page, but different text on the other pages:

{ IF { PAGE } = { NUMPAGES } { FILENAME \p} "This is not the last page"}

You can also modify the header or footer so that it only prints on pages except the final page. For example, this allows you to add 'Continued ...' on all pages except the final page:

{ IF { PAGE } < { NUMPAGES } " Continued... " }

As you have learned in other WordTips, you can insert field braces by pressing Ctrl+F9, and you can nest different fields, as this tip requires. To create the header or footer you desire, open your document and follow these steps:

  1. If the document has several sections, position the insertion point anywhere in the section where you want the header or footer to appear.
  2. Choose Header And Footer from the View menu. Word displays the Header and Footer dialog box.
  3. Use the controls in the Header and Footer toolbar to display either the header or footer, depending on which you wish to change.
  4. Enter the compound field you wish to use (as discussed previously in this tip).
  5. With the insertion point within the compound field you created, press Shift+F9 to collapse the field.
  6. Click on Close in the Header and Footer toolbar.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1045) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Using Last-page Headers and Footers.

Related Tips:

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Yogesh Valvaikar    15 Apr 2015, 08:55
Hi Peregrino69,

I am not sure if you found your solution since it been almost a year. I had similar issue on my document that generates dynamically and had to print a certain 4 para footer on the last page with the help of section break.

My solution might help you as well as Shelley.

1. Create a Section Break either Continuous or Next Page. I used Continuous.
2. In properties of footer go to last tab; Layout and select Different First page under Header and Footer.

3. Insert a temporary page break to go to the next page.
Now you will have two Header and footers to play with.

4. Insert a footer you want to print for the rest of the document on first footer and on the second footer use the tip shared by Alan.

5. You can remove the temporary Page break and continue working on your document.
As long as no one change the section break your footer will print as usual on last page.

6. Last but not the least, make sure you enclose the text you want to print in double quotes and if you para has double quotes that may be there reason why it shows half of text.

If it is simple IF condition so IF PAGE = NUMPAGES "Footer1 for last page" "Footer2 for other pages" will also work. I haven't tried this though.
Shelley    27 Mar 2015, 18:06
This work great, I have a graphic I want to only print on the last page; however, it doesn't always print. If I got into the footer and press F9 to update it and then print, it prints fine; however, other users won't be doing this. How do I ensure that it will always print correctly? Also, how do I get it to convert to PDF correctly?
Peregrino69    20 Jun 2014, 12:37
This is a cool tip.

Unfortunately it doesn't work for larger texts. I'm trying to create a report template which includes a multiline disclaimer. The wish is to have this disclaimer at the end of the report, which makes last page footer a natural location.

I can apply this technique to get the disclaimer showing only on the last page. Since it's multiline, the footer grows wider. However since the same footer is used also in previous pages, every other footer (except first page) grows equally, they just don't show the text.

It's possible to have a section break to the last page and apply the new footer there. This has other issues which make it inconvenient to use.

Is there any real way to have a footer on the last page which is not in any way depending on footers of other pages? Except for using a new section?
awyatt    23 May 2014, 08:13
Jonny: You put the field codes in your header or footer since that is where you want to control what appears on normal pages vs. the last page.

Jonny    23 May 2014, 07:12
This doesnt make sense - where do you enter the code above - nowhere is the answer
Sue    27 Jan 2014, 19:52
This is a great tool tip - Thanks. I have a question: How can I also determine what style I want applied to that text? (It will not be Footer style as per the rest of the document.)

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.