Page Number Totals

G

Galil

When you are using page x of y in a footer and you are eliminating the page
number on the first page, how do you elimiate it from calculating the total
pages of the document? The "y" is using the first page to calculate the total
number of pages. It is a template, so I don't want to hardcode the page
number. I want it to autocalculate as the template is being used.
 
S

Stefan Blom

Activate the header/footer view, for example by doubleclicking on the
footer. Then press Alt+F9 to show field codes. Replace { NUMPAGES } with { =
{ NUMPAGES } - 1 }. To insert each pair of field delimiters, press Ctrl+F9.
Type the code as shown. When you are done, select the field construct and
press F9. Press Alt+F9 again to hide field codes.

Note that if you have a one page file, the field I suggested above will
obviously display zero. You may want to use the following field construct
instead:

{ IF { NUMPAGES } < 2 "" "{ = { NUMPAGES } - 1 }" }

This conditional field displays nothing (the empty string) if the number of
pages is less than 2.
 
S

Stefan Blom

Clever trick!

--
Stefan Blom
Microsoft Word MVP



macropod said:
Hi Stefan,

A simpler solution:
{={NUMPAGES}-1 \# 0;;}

--
Cheers
macropod
[Microsoft MVP - Word]


Stefan Blom said:
Activate the header/footer view, for example by doubleclicking on the
footer. Then press Alt+F9 to show field codes. Replace { NUMPAGES } with
{ = { NUMPAGES } - 1 }. To insert each pair of field delimiters, press
Ctrl+F9. Type the code as shown. When you are done, select the field
construct and press F9. Press Alt+F9 again to hide field codes.

Note that if you have a one page file, the field I suggested above will
obviously display zero. You may want to use the following field construct
instead:

{ IF { NUMPAGES } < 2 "" "{ = { NUMPAGES } - 1 }" }

This conditional field displays nothing (the empty string) if the number
of pages is less than 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top