Add bookmark switches to Table of Contents for a document with several sections

I would like to add bookmark switches to Table of Contents for a document with several sections.  That is, each the document has bookmarks named S1, S2 and S3.  In the footer of each section the page numbering follows the total pages for all sections.  That is,

The footer of section 1 has the code:

Page { Page } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }

The footer of section 2 has the code:

Page { = {Page} + { PAGEREF S1 }  } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }

The footer of section 3 has the code:

Page { = {Page} + { PAGEREF S1 }  +  { PAGEREF S2 }  } of { = { PAGEREF S1 } + { PAGEREF S2 } + { PAGEREF S3 } }

Each section shows the total number of pages in the document (the sum of the three sections) and the individual page number of that page within the sections.  That is, each section has 2 pages so the footers show:

1 of 6

2 of 6

3 of 6

4 of 6

5 of 6

6 of 6.

The Table of contents, however, does not obey this method.  That is, the items on the first page of section 3 are listed as page 1 in the TOC and not page 5.

I have tried { TOC \b S3 \o "1-3" } but that did not work.

Please tell me how to set the field codes so that this would work.

Answer
Answer

Your response to Suzanne S. Barnhill contains important information on the document that was not included in your original question.

It appears that your document has 4 sections and not 3 as you stated.

Section 1 - Pages 1 - 3 - includes the Table of Contents

Section 2 - contains 2 pages, that you erroneously referred to as Section 1, the page numbers of which are to be 1 of 6 and 2 of 6

Section 3 - contains 2 pages - 3 of 6 and 4 of 6

Section 4 - contains 2 pages - 5 of 6 and 6 of 6

To get the Table of Contents to refer to the items in the above Sections 2, 3 and 4 with the page numbers that appear on those pages, you need to put a bookmark (say TOC) at the end of the Section 1 that contains the Table of Contents, etc., and then set the page numbering to start at 1 for the abovementioned Section 2 that starts on page 4 of the document and set the page number to be continuous across the other Sections of the document and then use the following in the footers of the Section 2 that starts on Page 4, and link the footers in the other Sections to that in the footer of that Section:

Page { page } of { = { numpages } - { pageref TOC } }

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

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 December 27, 2021 Views 440 Applies to: