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.

Using Last-page Headers and Footers

by Allen Wyatt
(last updated January 27, 2017)

6

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using Custom Number Formats

Most formatting needs are met by using the predefined formatting options in Excel. The program also allows you to move beyond ...

Discover More

Converting to Word 6.0 Format

Need to convert your document to a really old format previously used in Word? The solution may already be built into the ...

Discover More

Advanced Filtering

Many people know how to use AutoFilter, but there are times when you need some more filtering muscle. Here's how you can use ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (menu)

Form Fields in Headers and Footers

When working with form fields, you may want to place those fields in the header or footer of a document. Word won't let you ...

Discover More

Deleting a Header or Footer

When working with existing documents, you may need to delete a header or footer previously created. Here's how you can do it ...

Discover More

Copying Headers and Footers

Need to get headers and footers from one document to another? You can use the steps in this tip to help make quick work of ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 4?

2015-04-15 08:55:28

Yogesh Valvaikar

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.

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


2015-03-27 18:06:40

Shelley

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?


2014-06-20 12:37:35

Peregrino69

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?


2014-05-23 08:13:29

awyatt

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.

-Allen


2014-05-23 07:12:26

Jonny

This doesnt make sense - where do you enter the code above - nowhere is the answer


2014-01-27 19:52:50

Sue

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


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.