how do i only number pages if there is more than 1 page

A

APYDS

I am trying to do a template letterhead for my business in word 2007. I know
how to insert a page number in the bottom right of my footnote to say Page "1
of 10" along with other info about my company above that in the footer.

The point is that if you have only 1 page there is no point in having a page
number.

Is there any way (by VB programming or otherwise) to program the template to
only have page numbers if there is more than 1 page?
 
J

Jay Freedman

APYDS said:
I am trying to do a template letterhead for my business in word 2007.
I know how to insert a page number in the bottom right of my footnote
to say Page "1 of 10" along with other info about my company above
that in the footer.

The point is that if you have only 1 page there is no point in having
a page number.

Is there any way (by VB programming or otherwise) to program the
template to only have page numbers if there is more than 1 page?

Programming is overkill for this. Set up nested field codes in the
template's footer (use Ctrl+F9 to insert each pair of field braces):

{ IF {NUMPAGES} > 1 "Page {PAGE} of {NUMPAGES}" }


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
A

APYDS

Thank you so much Jay that is so helpful, however, I have to have a different
first page as the company info is in the footer on the first page as well
(i.e. on the first page is the words "xxxx Ltd whose registered office is
located at xxx" etc. That company info is not needed on the second or
subsequent pages. With the suggestion you have made, either I can not have a
different first page or I would have to have the company info on the footer
 
J

Jay Freedman

Go to File > Page Setup > Layout and check the box for "Different first
page". Then you can put whatever you want on the first-page footer,
independent of what's in the footer of the rest of the pages.
 
J

Jay Freedman

Sorry, I forgot this was Word 2007. The Different First Page check box is on
the Header & Footer Tools tab of the ribbon, which is visible when the
cursor is in the header or footer area. Check it, and put whatever you need
 
A

APYDS

Sorry Jay. That is my problem. If I check the different first page check
box and use the nested field code that you have suggested then only the first
page will be numbered if there is more than one page. What I need is for my
footer to appear without a page number if there is only one page. If there
is more than one page then the footer with the page number appears in the
first page and only the page number (in the format "Page # of #") appear in
the second and subsequent pages.
 
G

Graham Mayor

In that case you need a nested condition to handle the differences on page 1
e.g.

{ IF { Numpages } > 1 "{ IF{ PAGE } = 1 "{ PAGE }" "{ PAGE } of {
NUMPAGES }" }" ""}

It does not require the different first page option to be set to work.

OR

You can set the different first page option and use different calculated
fields in the first page and subsequent pages. ie in the first page you
would use
{ IF { NUMPAGES } > 1 "{ PAGE}"}
and in the subsequent pages
{ IF { Numpages } > 1 "{ PAGE } of { NUMPAGES }"}

The result would be 1 page - no Page number
2 or more pages - page 1 would show the Page number, subsequent pages would
show Page of Pages

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

APYDS

Thanks for that Graham. However, I would like my template to only start out
with one page, so that if there is only one page the footer would be:

"Another Home is a trading name of Another Home Limited whose registered
offices are located at 33 Another Street, Another Place, Mars, ZZA ZZA"

If there is then more than one pages, Page 1 would be:

"Another Home is a trading name of Another Home Limited whose registered
offices are located at 33 Another Street, Another Place, Mars, ZZA ZZA


Page 1 of {Numpages}"

And the remaining pages the footer would only be "Page { PAGE } of {
NUMPAGES }" i.e. only containing page numbers and not the words about trading
names etc..

If I folllow your first suggestion below then every page would have the
words "Another Home is a trading ... etc". Alternatively, if I follow your
second suggestion below then I would have to set the template to display more
than one page each time a new document based on that template is opened. Do
you have any further suggestions?

I am grateful for your help so far.
 
J

Jay Freedman

Let's go back to the beginning. Please discard your preconceived notions...

Start with the template with no footer on any page. Temporarily press Ctrl+Enter
to insert a manual page break, so there are two pages (otherwise you won't be
able to see the footer for pages 2 and beyond). Turn on the "Different first
page" option.

In the First Page Footer (which will be identified that way) insert your text
followed by the field I showed:

Another Home is a trading name of Another Home Limited whose registered offices
are located at 33 Another Street, Another Place, Mars, ZZA ZZA { IF
{NUMPAGES} > 1 "Page {PAGE} of {NUMPAGES}" }


In the second-page Footer, insert only the field, which is the same as the one
on the first page:

{ IF {NUMPAGES} > 1 "Page {PAGE} of {NUMPAGES}" }


Now delete the temporary page break and save the template. Create a document
based on the template, and try it with various numbers of pages. It should
behave exactly as you described.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
G

Gordon Bentley-Mix

Also you can probably get away with using just "Page {PAGE} of {NUMPAGES}"
(without the quotes) in the second page footer, since this footer will only
be displayed if there is more than one page - which sort of makes the check
to see if the number of pages is greater than 1 (IF {NUMPAGES} > 1)
superfluous...
--
Cheers!

Gordon Bentley-Mix
Word MVP

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
A

APYDS

Thanks so very much Jay and Gordon. That has worked perfectly.

I hope you do not mind if I ask for a little more help though. For my
header on the same template I have an image which I designed on Publisher and
have now cut and paste into word. When I open a new template the cursor is
always located at the top of the page where the image is located. I would
like the cursor to always be positioned just after the image. what is the
best way to achieve this?

Obviously, I can move the header down and place the image in the header but
that messes up the header for the subsequent pages. If I place a section
break in the subsequent pages then it seems as though I can not save a
template with only one page.

Any ideas?
 
D

Doug Robbins - Word MVP

Your document should be set up with a Different First Page Header as Jay
suggested in his most recent response. Then you should insert the image
into the First Page Header, not into the body of the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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