Include a footer on only the last page of a variable size word document

BritaJ
BritaJ used Ask the Experts™
on
I have a document which needs to have a footer on the last page only.  I can't use the usual section brake solution because the document is of variable length, depending on which "boiler plate" paragraphs are included.
From what I have read it looks like I might have to add some visual basic to the document to get it to work.  I have never done this, so I will need some very simple instructions.

Thanks,
Brita
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
GrahamSkanRetired
Top Expert 2012

Commented:
Visual basic could probably do it, but it is not a very good solution, because it might need to be re-run after any change, including a change of printer (driver).

You really need to use an { IF... }  field with embedded { PAGE } and { NUMPAGES } fields:

{ IF {Page} = {Numpages} "last page footer" "other page footer"}

Author

Commented:
Gram,
That looks great, but word isn't my speciality and I don't understand how to make this show up in the footer.  I copy and past that into the footer, but it just shows that text not the result.
Are there some sort of steps to put code into the footer?

Thanks,
Brita

Author

Commented:
Graham,
I figured out how to make it show up, but it is not working.  It keeps just saying "other page footer" even on the last page.  
 
Any ideas?

Thanks,
Brita
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Retired
Top Expert 2012
Commented:
Oh. OK.
That is just what it looks like. The {} pairs are field delimiters, which can be entered with Ctrl+F9 (or by Insert Field). Any other text can be typed in as usual from the keyboard. Note. It is a bit easiet to type in the outer parr first:

{}

Then Type 'IF' between the brackets:

{ IF }

Then select the following position an insert another pair of brackets;

{ IF {} }

Type the word PAGE in between the new brackets, and add and '=' sign outside of the new brackets

{ IF { PAGE } = }

Carry on in this manner until you have the two choices of the text. Note that the texts can be fully formatted, including new paragraphs, tables, etc .
GrahamSkanRetired
Top Expert 2012

Commented:
Not the world's greatest typist myself. This:

"It is a bit easiet to type in the outer parr first:"

should be


"It is a bit easier to type in the outer pair first:"

Sorry about that
GrahamSkanRetired
Top Expert 2012

Commented:
My last two comment didn't see your last comment at 22:30 GMT. I'll try to address it in a minute
GrahamSkanRetired
Top Expert 2012

Commented:

Author

Commented:
Graham,
Your last post was correct.  I didn't understand about the CTRL F9.  I just inserted a new page then edited the it using regular {} not the ones created by CTRL F9.  Once I used that it works GREAT!!!!

Thanks soooooo much for your help.
I had been tearing my hair out for hours and no one around here had any idea how to help.

Thanks again,
Brita

Author

Commented:
Graham is Great!  He deserves the title of Genius.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial