I'm creating a template where is same content in Header and Footer except the last page (there is some additional text).

So I have document with two sections. Everything written to the section 1 has Header/Footer A and everything written after the End of the section (means written in section 2) has Header/Footer B.

Two section document

If document has only one page, the section end is deleted - whole document gets Header/Footer B (formerly section 2).

End of section deletion

Everything above works as expected and it's OK. BUT... The template is used by BFUs whose are unable to work with sections.

The question

Is possible to have different Header/Footer on the last page without macros, add-ins, and keep it BFU friendly?

PS: BFU is not meant offensively, it's short terminus technicus for "low-skilled user with no will to learn something new".

1 Answer 1


Yes, but how easy is a question. It requires a complex field.

You can put that field in your template. Fields are not macros but can seem mysterious. Here is my article on Dealing with Fields. Please read this before attempting to create the needed fields.

This issue of a different last page is addressed in the context of the footer in my chapter on Sections and is easily adapted to either the header or footer.

The required field in your template's header/footer is along the following lines:

screenshot f field

In this example { FILENAME \p } is shown on the last page and the page numbering is shown on all other pages. The colors are not needed for field operation but are for illustration.

This is an IF field or a comparison field that compares the current page number with the total number of pages and gives the filename if they are equal and the page numbers if they are not. You cannot simply type this field nor can you use dialogs to create the entire field. Here it is in text:

{ IF { PAGE } = { NUMPAGES } "{ FILENAME \P }" "Page { PAGE } of { NUMPAGES }" }

You may want to use Word MVP Graham Mayor's Add-In to convert the above text to a real field, or insert your own text first and then convert.

You will run into problems if your Section B runs over a page. Consider also whether a StyleRef field would meet your needs. It reports text in the page in the header/footer and only changes when there is new information.

Note, except the link to Graham Mayor's Add-In, links are all to things that I have written/compiled.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .