Anyone good with MS Word? Using fields........ Help!
Anyone good with MS Word? Using fields........ Help!
Author
Discussion

funkyol

Original Poster:

1,816 posts

249 months

Tuesday 19th September 2006
quotequote all
Hi,

Not sure if anyone can help, before I have to register on some geeky Word forum of some sort, but here goes:

I'm trying to use an IF statement to display a footer message in Word, that only appears in the footer on the last page of the document.

I've written this:

{IF {PAGE} = {NUMPAGES}"""My footer message here"}

What this should do is detect the last page and display the message, but only on the last page. However it doesn't - it appears on every page. Trouble is, it doesn't error, and going on what i've found on the net, it should work, but it doesn't. Can anyone shed any light?

Thanks in advance.

roadsweeper

3,789 posts

304 months

Tuesday 19th September 2006
quotequote all
Section breaks are your friend here.

Simply go to the penultimate page of your document and go to Insert -> Break and then select 'Next Page' from 'Section break types.'

Then, go into the footer of your last page, which is now a different section than the rest of your document, and deselect the 'link to previous' button that is on the toolbar that appears when you go in the footer. This will ensure that the footer for this section is entirely disconnected from previous sections. Now just put in your new content in the footer and Bob's your uncle.

Miles_stylus

332 posts

261 months

Tuesday 19th September 2006
quotequote all
what are you attempting to do with this solution?

Miles

flossythepig

4,143 posts

273 months

Wednesday 20th September 2006
quotequote all
funkyol said:
{IF {PAGE} = {NUMPAGES}"""My footer message here"}

{ IF Expression1 Operator Expression2 TrueText FalseText }

Your logic should put the message on every page but the last one.

If you are using multiple sections starting page numbers with different sections it can confuse Word. Try inserting a bookmark at the end of the document (bmEndPoint) and use this permutation.

{IF {PAGE} = {PAGEREF bmEndPoint} "True" "False"}

"True" should appear on the same page as the bookmark
"False on all other pages.