View Single Post
  #3  
Old April 15th, 2010, 04:20 PM posted to microsoft.public.word.pagelayout
Jay Freedman
external usenet poster
 
Posts: 9,488
Default Total Page Number Minus Number of Pages in Front Matter

There are two possible situations:

- If the document contains only two sections (separated by one section
break), then you can simply change the field that supplies the total. If you
right-click the total number and choose Toggle Field Codes, you'll see the
field code {NUMPAGES}. Change that to {SECTIONPAGES} and press F9 (or
right-click and choose Update Field) to show the result. This will now be
the total number of pages in the section that contains the body.

- If the body of the document consists of two or more sections (not counting
the frontmatter section), then the SECTIONPAGES field won't work -- it would
show the total of pages in the current section, which would change part way
through the body. Instead, first insert a bookmark in the last paragraph of
the document -- I suggest naming it LastPage. Now right-click the total
number in the page numbering and choose Toggle Field Codes. Replace the word
NUMPAGES with this:

PAGEREF LastPage

(If you named the bookmark something else, use that in the field code.)
Press F9 to update the field, which will show the page number of the last
page in the body.

There's a minor difficulty with this: It's easy to overwrite and delete the
bookmark, in which case the field will display "Error! Bookmark not
defined." Then you have to go back to the end of the document and insert the
bookmark again. It's also easy to add more pages after the bookmark, in
which case the page numbering will be wrong, and you'll have to move the
bookmark (which you do by going to the end of the document and inserting the
same bookmark, which automatically deletes the old one). It helps to go into
the Options dialog and check the box to display bookmarks at all times.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Rhonda wrote:
I have a document with 4 pages of front matter (cover page and table
of contents) and then 42 pages of text in the body of the document.
I have the pages of the body numbered "Page X of Y", but the Y is the
total pages of the entire document (46) and I want it to represent Y
minus the pages in the front matter (42) i.e. I want all my body
pages to actually say "Page 'X 'of 42" not "Page 'X' of 46". Of
course I could manually enter the number 42 in place of Y, but the
document will eventually be updated and additional pages will result
so I want it automated. (If the solution involves fields and
formulas, go slow I have no idea how to create new ones!)

Thanks so much!
Rhonda