If I have a multiple page document and want a footer to appear only on
the last page, what are the steps to accomplish this. I've tried
inserting a continous section break at the top of the last page and then
adding a footer for section 2. When I go to insert the footer, I can't
get to the footer for section 2. What am I doing wrong?
Thanks for your help.
Denis
>Hi everyone,
>
>If I have a multiple page document and want a footer to appear only on
>the last page, what are the steps to accomplish this. I've tried
>inserting a continuous section break at the top of the last page and then
>adding a footer for section 2. When I go to insert the footer, I can't
>get to the footer for section 2. What am I doing wrong?
Try placing a Next Page section break on the penultimate page.
Or try using nested fields instead.
{ IF { PAGE } = { NUMPAGES } "your last page footer" "" \* MERGEFORMAT
}
Insert the IF field first. The two pairs of double quotes (around
"what to print if the condition tests true" and "what to print if
condition tests false") ARE needed.
The nested fields method has the advantage that it keeps working if
you add so much text to the final page that it ain't the final page
any more.
--
Regards
Peter Boulding
P.Bou...@btinternetUNSPAM.com
(to e-mail, remove the "UNSPAM")
Check out the Word FAQs at http://www.wordsite.com.
Here are a few topics from any one of which you can glean the answer to your
question.
HTH
--
Bill Coan
Microsoft Word MVP
Neenah, Wisconsin USA
http://www.wordmacros.com
Treat different pages differently with the help of an "if" field.
In its most basic form, Word's standard "IF" field looks like this:
{ IF "Expression" = "Expression" "Expressions Are Equal" "Expressions Are
NOT Equal" }
This field evaluates the statement at the start of the expression
("Expression" = "Expression"). If the statement is true, the field inserts
the first string of characters ("Expressions Are Equal") into the document.
If the statement is false, the field tells Word to insert the second string
of characters ("Expressions Are NOT Equal") into the document.
The field becomes more userful when it compares some meaningful values such
as the current page number and the total number of pages in the document:
{ IF { PAGE } = { NUMPAGES } "Expressions Are Equal" "Expressions Are NOT
Equal" }
The field becomes even more useful when it inserts a more descriptive string
of characters into the document:
{ IF { PAGE } = { NUMPAGES } "This is the last page" "This is NOT the last
page" }
The field becomes still more useful when it inserts a more valuable string
of characters into the document:
{ IF { PAGE } = { NUMPAGES } { FILENAME } "This is NOT the last page" }
The field can choose a legitimate string ({FILENAME}) if the statement is
true and a NULL string if the statement is false:
{ IF { PAGE } = { NUMPAGES } { FILENAME } "" }
The {FILENAME} field within the {IF ...} field can be upgraded to return to
the path along with the filename:
{ IF { PAGE } = { NUMPAGES } { FILENAME \P} "" }
When a field is updated, any formatting applied to the field result may be
lost. To prevent this, you can include a MERGEFORMAT switch:
{ IF { PAGE } = { NUMPAGES } { FILENAME \P \* MERGEFORMAT} "" }
Here's an If field that inserts roman page numbers in Section 1 and arabic
page numbers in all other sections:
{ If { SECTION } = 1 "{ PAGE \* roman } of { SECTIONPAGES \*
oman }"XXXX"{ PAGE \* arabic } of { SECTIONPAGES \* arabic }"
Here's one that displays the page number only if the page number is greater
than 4.
{ IF { PAGE } > 4 { PAGE } }
To insert an {IF ... } field into a document:
1. Press Ctrl+F9 to insert a set of field braces.
2. Inside the braces, type the expression shown below, using arrow keys to
navigate within the field and Ctrl+F9 to insert additional braces as needed:
{ IF { PAGE } = { NUMPAGES } { FILENAME \P \* MERGEFORMAT} }
3. Select the entire field expression, starting with the first opening brace
and ending with the last closing brace.
4. Right-click the selected area and choose Toggle Field Codes. This will
tell Word to hide the field from view.
5. On the View menu, choose Header and Footer to close the header and footer
view and return the cursor to the main document.
Tell Word to update the field with the current results:
1. To tell Word to update the field just before printing, click Options on
the Tools menu, then choose the Print tab at the top of the dialog box and
place a checkmark in the Update Fields checkbox.
2. To tell Word to update the field immediately, right-click the field and
select Update Field.
For more information about fields:
Choose Field on the Insert menu. Then click the What's This? Button and
choose a field code. Word will display a definition of the field with
examples of how the code can be used.
Insert the filename and path on the last page of a document, in a form that
will be updated automatically if the filename or path changes. <list of
topics>
Solution:
Insert into the header or footer an "if" field (special hidden instruction)
that tells Word to insert the filename and path if on the last page but
insert nothing if NOT on the last page.
Notes:
Inserting the field into the header or footer will assure that it will be
present on the last page (and indeed all other pagges), no matter how many
pages the document contains. Even though present on all pages, it will cause
the filename and path to appear only on the last page.
The field in this case will be a compound entity that consists of three
fields nested within a fourth field. It will look approximately like this:
{ IF { PAGE } = { NUMPAGES } { FILENAME \P \* MERGEFORMAT} }
The braces shown here were typed manually. The braces in the actual field
will look slightly different, because Word will insert them using special
characters that look slightly different.
Insert the required field into your doc:
1. On the View menu, choose Page Layout.
2. On the View menu, choose Header and Footer
3. Scroll up or down (if needed) until you can see the header or footer
where you want the page number to appear.
4. Click where you want the page number to appear (could be at the beginning
of a line, or just after a tab character, etc. etc.)
5. Press Ctrl+F9 to insert a set of field braces.
6. Inside the braces, type the expression shown below, using arrow keys to
navigate within the field and Ctrl+F9 to insert additional braces as needed:
{ IF { PAGE } = { NUMPAGES } { FILENAME \P \* MERGEFORMAT} }
7. Select the entire field expression, starting with the first opening brace
and ending with the last closing brace.
8. Right-click the selected area and choose Toggle Field Codes. This will
tell Word to hide the field from view.
9. On the View menu, choose Header and Footer to close the header and footer
view and return the cursor to the main document.
Tell Word to update the field with the current results:
1. To tell Word to update the field just before printing, click Options on
the Tools menu, then choose the Print tab at the top of the dialog box and
place a checkmark in the Update Fields checkbox.
2. To tell Word to update the field immediately, view the header or footer,
then right-click the field and select Update Field. (Make sure you're on the
last page of your document when you do this, or there'll be nothing to see
after the field is updated!)
For more information about fields:
Choose Field on the Insert menu. Then click the What's This? Button and
choose a field code. Word will display a definition of the field with
examples of how the code can be used.
Display the word "more" at the bottom of every page except the last page.
Solution:
Insert into the footer an "if" field (special hidden instruction) that tells
Word to insert nothing on the last page and "more" on all other pages.
Notes:
Inserting the field into the footer will assure that it will be present on
all pages, no matter how many pages the document contains. Even though
present on all pages, it will not cause "more" to appear on the last page.
The field in this case will be a compound entity that consists of two fields
nested within a third field. It will look approximately like this:
{ IF { PAGE } = { NUMPAGES } "" "more" }
The braces shown here were typed manually. The braces in the actual field
will look slightly different, because Word will insert them using special
characters that look slightly different.
Insert the required field into your doc:
1. Position cursor where you want the field.
2. Press Ctrl+F9 to insert the field braces. (Don't use regular braces!)
3. Type the field expression as it appears below, using Ctrl+F9 and arrow
keys as needed to keep text within the various braces as you type.
{ IF { PAGE } = { NUMPAGES } "" "more" }
4. Select the entire expression.
5. Right-click the selection and choose Toggle Field Codes.
Tell Word to update the field with the current results:
1. To tell Word to update the field just before printing, click Options on
the Tools menu, then choose the Print tab at the top of the dialog box and
place a checkmark in the Update Fields checkbox.
2. To tell Word to update the field immediately, view the header or footer,
then right-click the field and select Update Field.
For more information about fields:
Choose Field on the Insert menu. Then click the What's This? Button and
choose a field code. Word will display a definition of the field with
examples of how the code can be used.
dfink wrote in message <3724B3...@wpsr.com>...
>Hi everyone,
>
>If I have a multiple page document and want a footer to appear only on
>the last page, what are the steps to accomplish this. I've tried
>inserting a continous section break at the top of the last page and then
>adding a footer for section 2. When I go to insert the footer, I can't
>get to the footer for section 2. What am I doing wrong?
>
I tried your nested codes as well as Peter's nested codes in the footer, but
was unable to make it work properly. It prints on every page, not just the
last page. I figure I'm doing something wrong here. Did I miss a step?
I've tried it with and without section breaks.
Help!!!
Thanks,
Hagar
to email, please remove "7" from the address
Bill Coan <bill...@wordmacros.com> wrote in message
news:##MORtEk#GA.270@cppssbbsa03...
>Hi Bill,
>
>I tried your nested codes as well as Peter's nested codes in the footer, but
>was unable to make it work properly. It prints on every page, not just the
>last page. I figure I'm doing something wrong here. Did I miss a step?
>I've tried it with and without section breaks.
>
>Help!!!
A couple of possibilities:
1. Have you got Word set to update fields when printing? (Tools ->
Options -> Print -> Update fields)
2. This is one of those irritating areas in which Word's logic differs
from Excel's. To use an IF field you must have both a "what to print
if condition is true" and a "what to print if condition is false" -
even if one of them is only "" (a pair of double quotes, meaning
"print nothing"). If you only enter one "what to print" string, it
appears whether the condition is true or false.
Can you post a representation of the fields you're using and let us know
whether you've followed Peter's recommendations and if so with what result?
--
Bill Coan
Microsoft Word MVP
Neenah, Wisconsin USA
http://www.wordmacros.com
Hagar wrote in message ...
Actually, I even went as far as to copy and paste the nesting in Peter's
post into the footer of my document. It prints on each and every page. Of
course, when I did that, what actually prints on each page is the word PAGE.
I must be doing something wrong.
Oh yes... Peter, my Print settings in Word are to Update fields.
Thanks again!
Hagar
Bill Coan <bill...@wordmacros.com> wrote in message
news:eSVz0qOm#GA.237@cppssbbsa03...
--
Suzanne S. Barnhill
Microsoft Word MVP
Words into Type
Fairhope, AL USA
>> field must use field braces, which must be inserted using Ctrl+F9 or
with the Insert | Field command, not typed from the keyboard. <<
I used Ctrl+F9, then copied the information into the field, sans the far
outside brackets. I also typed it out with the same effect. (using
Ctrl+F9).
Thanks,
Hagar
Suzanne S. Barnhill <sbar...@zebra.net> wrote in message
news:uFep6Jvm#GA.263@cppssbbsa03...
Have a look in Tools Options Print. Is the Field Codes checkbox checked? If
so, uncheck it.
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email
>Dear Suzanne
>
>>> field must use field braces, which must be inserted using Ctrl+F9 or
>with the Insert | Field command, not typed from the keyboard. <<
>
>I used Ctrl+F9, then copied the information into the field, sans the far
>outside brackets. I also typed it out with the same effect. (using
>Ctrl+F9).
>
>Thanks,
> Hagar
Can't do that, either, Hagar. ALL pairs of field boundaries must be
inserted with Ctrl+F9. So (after some deep breaths):
1. Press Ctrl+F9 to insert the field boundaries for the IF field.
2. With the cursor still in the middle of the resulting pair of field
boundaries, type - or copy and paste - the following text:
IF = "your last page footer" "" \* MERGEFORMAT
3. Place the cursor between the two spaces that separate "IF" from
"=".
4. Press Ctrl+F9 to insert the field boundaries for the PAGE field.
5. With the cursor still in the middle of the resulting pair of field
boundaries, type - or copy and paste - the following text:
PAGE
6. Place the cursor between the two spaces that separate "=" from the
first double quote mark.
7. Press Ctrl+F9 to insert the field boundaries for the NUMPAGES
field.
8. With the cursor still in the middle of the resulting pair of field
boundaries, type - or copy and paste - the following text:
NUMPAGES
9. Go to Tools -> Options -> View and make sure that 'Field codes' is
UNchecked.
10. Select the whole footer and hit F9 (to update all fields within
the selection).
11. Tell us how you got on.
Yup, that worked, Peter. If only my brain had been engaged when I read the
term "NESTED fields" <rolling eyes>.
Thanks for your patience. I think I've got it now. <sheepish grin>
Thanks for all your help, all of you... Peter, Bill, Suzanne & Jonathan. I
appreciate it muchly. I learn a lot from you... not just the "how to's" in
Word, but the "how to's" on the proper way to give support... sharing
information and not talking down to people.
Thanks again, and God bless you!
Hagar
Peter Boulding <p.bou...@btinternetUNSPAM.com> wrote in message
news:373c085d...@news.btinternet.com...
> On Mon, 10 May 1999 09:50:42 -0500, "Hagar" <b7ch...@mspmac.org>
> wrote:
>
> >Dear Suzanne
> >
> >>> field must use field braces, which must be inserted using Ctrl+F9 or
> >with the Insert | Field command, not typed from the keyboard. <<
> >
> >I used Ctrl+F9, then copied the information into the field, sans the far
> >outside brackets. I also typed it out with the same effect. (using
> >Ctrl+F9).
> >
> >Thanks,
> > Hagar
>