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

Controlling the Display of Toolbars

The various toolbars available in Excel are indispensable when it comes to easily accomplishing tasks. Here is a concise ...

Discover More

Running a Macro When a Worksheet is Deactivated

You can easily configure Excel so that it runs a specific macro whenever a worksheet is deactivated. Just follow the easy ...

Discover More

Blank Lines before Tables

Adding a blank line before your table is easy, but Word's behavior as you attempt to make the insert can depend on where the ...

Discover More

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!

MORE WORDTIPS (MENU)

Pulling Headers and Footers from Other Files

You may have some standard headers and footers you want to make available in your document templates. This tip describes some ...

Discover More

Deleting All Headers and Footers

Headers and footers add a finishing touch to documents, but sometimes they can be bothersome. You may need to remove them all ...

Discover More

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
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 for this tip:

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. 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 8 - 1?

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


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.

Links and Sharing
Share