We frequently need to write specifications in Word which require a TOC that refers to the total number of pages in a section, rather than the page number. E.g.,

Section                    No. Pages
01010 Summary of Work..............5
01025 Prices.......................2
01400 Quality Control..............1
01700 Contract Close Out...........2

A wrinkle is that each section is a separate file. To date, we've been writing or TOC by hand, which has introduced every error imaginable. Is there an MS feature that populates a TOC with page totals? If not, I've done a little VB in Office, so wouldn't be opposed to that route as need be, as long as it was usable by our low tech users.

Related question - all the section files are in the same folder. It would be nice if the TOC loaded every file in a folder, rather than having to specify each one. Is this a feature of Word or would this require VB? We tried a master document with links to subdocuments, but since the number of section files ebbs and flows with each project, the approach required too much maintenance for our Wordophobes.

  • Are you using INCLUDETEXT to include your sections, or are you currently relying on { RD } fields to help you generate a ToC for the complete document, and printing the documents separately? – user181946 May 30 '14 at 11:18
  • We had been using the Master Document approach, which required too much maintenance for our users. Is this a common experience with Master Documents? Thanks for the IncludeText and RD tip. I'm looking into them now. – buttonsrtoys May 30 '14 at 12:06
  • Striking the balance between ease of use, robustness and Word functionality is very difficult. If you want consistency of numbering and styles, a single document is most likely to avoid the style clashes that you will probably get with either Master Documents or INCLUDETEXTs. If your documents need to be composed of (say) a main text with annexes provided by 3rd parties, the problem is dealing with all the style and numbering clashes you'll encounter. Includetext/RD won't help you with the page count thing on their own, but how to approach that depends on the overall document structure. – user181946 May 30 '14 at 12:35

You may well be able to pull something together by using the same technique described here to add a prefix to the page numbers in a TOC.

In your case you would activate the TOC switch to exclude page numbers and insert your page totals instead by adding your own prefix to heading paragraphs. If each of your documents only include one section you could try a SECTIONPAGES field or otherwise include a uniquely named bookmark at the end of each document and reference it using a PAGEREF field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.