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:
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.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Headers and footers add a finishing touch to documents, but sometimes they can be bothersome. You may need to remove them ...
Discover MoreIf you are creating a macro that, in the course of processing your document, needs to update all the fields in the ...
Discover MoreDon't want a header or footer to appear on just a portion of your document? It's easy to do when you understand that ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.)
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.
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments