Conditional Page Numbers

D

David Pryor

I am creating a simple template using Word 2003 which could be used to create
either single or multi page documents. If the document is only one page in
length I do not want a page number displayed however if there are two or more
pages I want the page numbers to show. I have tried using IF and testing PAGE
and NUMPAGES as well as 'Different first page' for the footer but cannot get
the result I want. It sounds so simple but I'm stuck any assistance would be
greatfully received.

Thanks in advance.
 
S

Suzanne S. Barnhill

This is *really* not difficult. First, however, decide whether (for any
reason), you want a different header or footer (or margins) on the second
and subsequent pages. If so, you'll want to check "Different first page" and
follow the instructions in http://sbarnhill.mvps.org/WordFAQs/Letterhead.htm
for setting up the First Page Header/Footer and the Header/Footer.

If you do choose to use the "Different first page" option, much the easiest
approach is just to put the page number in the Footer only, omitting it from
the First Page Footer. Since the first page of a document is usually
distinctive in some way, it rarely needs a page number 1. However, if you do
want a page number on the first page, but only if there are subsequent
pages, then the approach is the same whether it goes in the Footer or (with
"Different first page") the First Page Footer (if you use "Different first
page," you just put a simple page number in the Footer). The field you want
is:

{ IF { NUMPAGES } > 1 { PAGE } }

You can create most of this field using the buttons on the Header and Footer
toolbar. Type IF, click the Insert Number of Pages button, type > 1, and
click the Insert Page Number button. Then select everything you've produced
and press Ctrl+F9 to convert the entire construction into an IF field. Press
F9 to update and you're done.
 
D

David Pryor

Suzanne thanks for your swift reply, I have tried your solution and
unfortunatly I do not get a page number displayed but the word 'NUMPAGES'
just as it is in the IF statement.

I have years of experience using different versions of Word including many
years supporting it and Windows for various big UK companies but this
"simple" thing has got me beaten. If you have the time and any other ideas
where I'm going wrong, I would really appreciate it. Treat me like an idiot
who knows nothing.
 
T

Tony Jollans

I suspect you have entered all but the outermoat braces as text.

If you follow Suzanne's instructions it should work correctly.

Or, to correct what you've got, delete the braces round NUMPAGES then select
the word NUMPAGES and press Ctrl+F9. Repeat with PAGE.
 

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