Page Numbering using Page X of Y

I created a document where I am using Page X of Y in the Footer. There is a separate Cover Page and seperate Table of Contents Page along with the regular text. Each of these separations are in separate sections using Section Breaks. Although I have done this the end count of the page numbers are calculated e.g. Page 1 of 8. I only want the sections with the actual documentation calculated e.g. Page 1 of 6, Page 2 of 6, etc.

 

I try to edit the fields by manually changing the numbers and that worked fine; however, when pages are added, then the count goes to e.g. Page 7 of 6,(because the manually edited ones will not change).

 

Any help in getting this sorted out is greately appreciated.

 

 

Answer
Answer
The standard Page X of Y insert uses a {NUMPAGES} field to show the Y number (that's what you'll see if you right-click the number and click Toggle Field Codes). That always calculates the total number of pages in the document.

If your description is accurate and there are only three sections in the document, you can replace the {NUMPAGES} field with a {SECTIONPAGES} field to get the correct number -- that one shows the number of pages in the current section. While the field code is showing, just edit the word NUMPAGES to SECTIONPAGES, and then right-click and click Update Field.

If there are actually more than three sections in the document, it gets a little harder. After toggling the field code, leave the NUMPAGES field as is. But type an equal sign to its left, and -2 (that is minus two) to its right. It should look like this:

   Page 1 of ={NUMPAGES}-2

Then select from the equal sign to the 2 and press Ctrl+F9, which adds another pair of field braces around it. Now it should look like

   Page 1 of {={NUMPAGES}-2}

Right-click that field and click Update Field. It'll do the math to subtract 2 from the total number of pages, leaving the count of whatever is between the first and last section breaks.
_____________________________
https://jay-freedman.info

12 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated January 19, 2024 Views 3,237 Applies to: