Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page numbering field code problem (Word 2004 for the Mac)

    Hi everyone,

    I have a 26 page file. The first and second pages each have their own sections - one being the title page, the other being the table of contents page. Third page is the beginning of the third section and where I would like the page numbering to begin. Even though it's a 26 page file, since I'm starting the numbering on page 3, I need the numbering to say x of 24 pages, ie. 26 minus the two beginning pages which I don't want to number. I've inserted a footer with the following field code:

    { PAGE } of {={ NUMPAGES }-{PageRef S1}+{PageRef S2}}

    ... where S1 and S2 are bookmarks. I bookmarked the last few characters in each of section 1 and 2, so I could use them in the field code.

    The problem is that when I use the code above, the numbering says:

    1 of 27 pages

    This can't be right because there's only 26 pages in the entire file.

    I then tried to adjust the code by adding a set of parentheses like this:

    { PAGE } of {={ NUMPAGES }-({PageRef S1}+{PageRef S2})}

    Now when I toggle the field code it reads:

    1 of 23 pages

    I can't figure it out - I need it to say 1 of 24 pages. Can someone tell me what I might be doing wrong. Is the field code written incorrectly?

    Would really apppreciate any help.

    Thanks.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    Hi gwh,

    Try:
    { PAGE } of {={ NUMPAGES }-{PageRef S1}-{PageRef S2}}
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    I think (cannot test at the moment) you can also use

    { PAGE } of { SECTIONPAGES }

    to get the count of only the pages in that section, so you can use that if the rest of the doc is only one section.

  4. #4
    New Lounger
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    Thanks for the reply. I tried your suggestion but it's still saying x of 23 pages. In fact the very last page of the file is saying page 24 of 23!! I don't get it - I don't know if it helps but I didn't mention to you how many sections there are in the entire file. There are actually 10 sections so I don't know if this has anything to do with it not working.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    If you are certain that the first two sections will always be exactly one page each, you should be able to use

    { ={ NUMPAGES }-2 }

    Remember that you shouldn't type the field braces yourself, insert them by pressing Ctrl+F9 or using Insert | Field.

  6. #6
    New Lounger
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    The table of contents page might increase to two pages in the future if more information is added to the file, so I don't think that code will work. Also I've added the braces correctly.

  7. #7
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    Hi gwh,

    What do you get if you put a field coded as {SECTIONPAGES} in each unnumbered Section? Is it what you expect?
    OK, now try using {PAGEREF S1} and {PAGEREF S2} in in the same Sections. I suspect what you'll see is that {PAGEREF S2} returns the total page count up to that point (ie it includes Section 1's pages). In that case you could probably get away with:
    {PAGE} of {={NUMPAGES}-{PAGEREF S2}}

    As your numbered pages span more than one Section, a better way to go about the numbering issue might be to use a SET field in conjunction with a PAGE field, thus:
    {Set NoCount {PAGE}}
    in the 2nd section. This could go in the header or footer where it's less likely to be deleted by accident - your bookmarks are quite vulnerable in this respect.

    Then you could code your main page numbering fields as:
    {PAGE} of {={NUMPAGES}-NoCount}
    or
    {PAGE} of {={NUMPAGES}-{NoCount}}
    if you prefer.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    OK, try this then:

    { ={ NUMPAGES }-{ PAGEREF S2 } }

    There is no need to subtract the page number for section 1.

  9. #9
    New Lounger
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Page numbering field code problem (Word 2004 for the Mac)

    Thanks so much for all the advice.

    {PAGE} of {={NUMPAGES}-{PAGEREF S2}} works very well, but I've decided to go with the Set NoCount method for the reasons that you mentioned.

    Really appreciate everyone's input!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •