PDA

View Full Version : DIFFERENT FOOTER LAST PAGE OF SECTION



Greg
09-16-2012, 06:17 AM
Dear all,

I am persisting in my quest for the ideal IF statement to put into the footers of my affidavits.

At Present I use { IF { Page }={ SectionPages } * { EMBED Equation.3 } }

The colour of the asterisk between SectionPages and EMBED Equation.3 is white so that nothing appears in the footer on the last page of the document. On all the other pages there is an overbar with the word "Deponent" or "Witness" under it.

The result is impressive and works very well until I introduce different sections at the beginning of the document. For example, if the first page of the document is a cover sheet (with an empty footer) with a section break between it and the next page, the IF statement won't work as intended unless I go into page numbering and restart the numbering for the new section. However, if I introduce further sections with page numbers before the main body of my document I lose control of the footer.

Does anyone know how I can have multiple sections at the commencement of my document without restarting the numbering and still make the last page of the section blank?

Section breaks inserted after the body of the document don't concern me but those inserted before the body of the document (containing my conditional footer) alter the footer even if the sections are not linked, especially if I want the pages numbers to run consecutively throughout the entire document.

If you wish to see an example of my document please let me know and I will upload it for you.

Regards,

Greg.

gmaxey
09-16-2012, 03:04 PM
Greg,

I think you will find some pointers here: http://www.vbaexpress.com/forum/showthread.php?t=43430

macropod
09-16-2012, 06:25 PM
I am persisting in my quest for the ideal IF statement to put into the footers of my affidavits.

At Present I use { IF { Page }={ SectionPages } * { EMBED Equation.3 } }

The colour of the asterisk between SectionPages and EMBED Equation.3 is white so that nothing appears in the footer on the last page of the document. On all the other pages there is an overbar with the word "Deponent" or "Witness" under it.


Does anyone know how I can have multiple sections at the commencement of my document without restarting the numbering and still make the last page of the section blank?
Hi Greg,

If the issue concerns changing the last page in the document, simply change 'SectionPages' to 'NumPages'.

If, however, it concerns the last page in a Section that precedes the last page, it becomes a matter of deduction the page count for the numbered pages in the preceding Section(s). In that case, you can use a field coded like:
{IF{={Page}-#}={SectionPages} * {EMBED Equation.3}}
where # is the count to be deducted. If, say, only one preceding Section is involved, but it's page count is variable, you could insert a field in that Section, coded as:
{SET Deduct {Sectionpages}}
and code the conditional field as:
{IF{={Page}-Deduct}={SectionPages} * {EMBED Equation.3}}
If you've got multiple previous Sections with a mix of fixed and variable page lengths to deduct, you can add more fields and expressions, like:
{IF{={Page}-3-Deduct1-Deduct2}={SectionPages} * {EMBED Equation.3}}

All fairly straightforward, if a little convoluted.

Frosty
09-17-2012, 04:35 PM
As an alternative to the excellent method Paul suggested, my typical "best practice" for something special on the last page of a section is to use a floating text box on that last page. You could anchor that text box to the last paragraph in the section, and then give it an absolute position and a white background to hide any text behind it.

If you then create that textbox as an autotext/building block entry, it becomes relatively easy to reinsert if it ever gets deleted.

But there are some real conundrums in trying to design word documents which don't adhere to the basic design concepts available in Word.

Although you can do work-arounds to hide things (which it sounds like you're doing, in some fashion, and also what I've suggested), you should know that this won't always be successful when that same document is read by something other than word (displaying that document via a "preview" type application in someone's email app in a browser, or on an iPad). It can also cause issues if you use the document to generate a PDF version.

Not sure if that's a concern for you... but it would be for me, in terms of designing it.

In general, if the last page of a section needs to be something other than the rest of the section (and the textbox methodology isn't an alternative), I would simply look at creating a new section. Sometimes trying to create a really complex solution to a problem makes you myopic about your approach... and you start generating new solutions for your solution, and end up trying to come up with a host of work-arounds to something which might be solved by avoiding the entire situation entirely.

For example:
If the reason you want your last page to automatically have a blank footer, why not just insert a next page section break? If the only answer is because you want the text to automatically from the 2nd to last page onto the last page... I would ask yourself if that automatic word-wrapping ability is worth all of the hoops you're putting yourself through.

We might have a few more ideas if you post a sample document of what you want, then you could get some fresh eyes on that problem.

Greg
09-20-2012, 11:31 PM
Thanks to all of you. I'll try those methods. I didn't get an email alerting me to your suggestions. I'll have to investigate that.

Greg
10-11-2012, 09:58 PM
Frosty, a sample of my document is attached. I'm reasonably satisfied with the result so far but despite Macropod's explanation I'm not entirely clear about what to do if additional section breaks are added to the document.