Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2011
    Location
    Washington, DC
    Posts
    98
    Thanks
    8
    Thanked 6 Times in 6 Posts

    Number of pages should count only the body of the doc

    My client wants page numbers in the form Page 1 of XX, where XX is the number of pages in the body of the document. If there were only one section in the body of the document I could use the Numpages field. But there are several sections.

    I could use a Pageref field for a bookmark at the end of the last body section, but that seems less than robust. An author could easily delete that bookmark.

    Any other ideas? I can envision a macro that totals the number of pages in each section, but the only ones I can think of involve looping which I don't know how to embed in a formula field.

    Thanks,

    Jessica

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Doesn't NUMPAGES count the total number of pages in the document? (Whereas SECTIONPAGES counts the total pages in a given section.)

    Gary

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    See How to set up a document with front matter numbered separately by
    Suzanne Barnhill, MVP and How to control the page numbering in a Word document. You can put a hidden page number field on the last page of the front matter (not a in a header or footer) and bookmark that. Use that in a calculation field. { = { NumPages } - { REF bookmark } }

    Note - hide the page number by coloring the font white on white or the equivalent, not by using the hidden attribute.
    Last edited by Charles Kenyon; 2012-02-07 at 21:59.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    Star Lounger
    Join Date
    Feb 2011
    Location
    Washington, DC
    Posts
    98
    Thanks
    8
    Thanked 6 Times in 6 Posts
    Thanks - I already have the numbering set up differently for the front sections, and am familiar with the various options.

    And yes, Gary, I meant SectionPages


    Mr. Kenyon's solution will work beautifully if I don't have appendices after the end of the document body and if the front matter is in a single section. But I can probably figure out something based on the technique. My authors like to number appendices in the A-1, B-1 style. So I can probably put white-font SectionPages fields into bookmarks for each appendix, and subtract those values from NumPages along with the front matter SectionPages value or values.

    I'll also see if they want to count the unnumbered pages at the start of some sections.

    Thanks for the ideas.
    Last edited by jweissmn1; 2012-02-08 at 09:50.

  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Hi All,

    I just tried Gary's suggestion of SectionPages {in Word 2010} in one of my documents and it works perfectly. This document has 3 sections with the third being the body of the document and the last page shows as 43 of 43 and used to show 43 of 49!

    Thanks Gary.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    2 Star Lounger
    Join Date
    May 2002
    Location
    Houston, Texas, USA
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The SECTIONPAGES solution worked perfectly for us, too. Thanks!

Posting Permissions

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