Word Custom Table of Contents

rogerdjr used Ask the Experts™
Using Word 365 - created a custom table of contents - want to save it to my template and use the same customized TOC in other documents

Can't seem to figure out how to do this

Any help would be appreciated

The attached file has two customized TOCs - one for the finished doc and one to help reviewers locate questions that need to be addressed
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
A table of contents in Word is the calculated result of a TOC field code. Press Alt-F9 to toggle between the results (the default) and the field code view. in your document, it looks like this:
{ TOC \h \z \t "Heading 2,1,Heading 9,2" }

This brings in all Heading 2 styled paragraphs as level 1 (using the "TOC 1" style) and all Heading 9 styled paragraphs as level 2 (using the "TOC 2" style). The \h switch sets the ToC entries as hyperlinks so you can jump to the heading by clicking the ToC paragraph; the \z switch suppresses page numbers in web layout view; and the \t switch is needed to "map" the content styles to the TOC levels (i.e. here you are mapping h2 to level 1 & h9 to level 2).

If you include it as you have it now in a template (i.e. copy & paste), it will be available but won't show anything until you have some Heading 1 and Heading 9 styled paragraphs it can accumulate for a new ToC. More likely, if you copy & paste what you have, you'll initially see the content you currently have because Word won't update the TOC field code. If you select it and press F9, the TOC field code will be recalculated -- but you won't see anything unless the template already has some of those heading paragraphs in it.

Your 1st ToC is pulling Heading 9 content. However, that style is being used for a number of different elements (i.e. dates within a table, alert notes as paragraphs...). This will work, but the \t switch lets you set up a ToC that can pull content from any named style and map it to any of the 9 built-in TOC x styles. In your case, you could consider using more ( and possibly different) styles to build the ToC.

For example, if your key dates were set with a custom style named "KeyDates", and the reviewer questions/notes as "RevNote" styles, the TOC field code could be edited to this:
{ TOC \h \z \t "Heading 2,1,KeyDates,2,RevNotes,3" }

That would create a table of contents where the key date content is set with a TOC 2 style, and the RevNotes content as a TOC 3 style. You could then modify the formatting of the TOC styles to differentiate them in your ToC.

Refer to this Microsoft Help page for details about the TOC field code.


Helpful but when I try to save the TOC format to my standard word template for use in future documents it doesn't show up

Is there a way to create a "library of Table of Content Formats" that is available with any new document?

You could select the field codes and save them as AutoText entities. Keep in mind that they will only show content when you have the stayed paragraphs within your document AND after you update the field code.

In my answer, I assumed you would be creating a specific template for the project, and that it would include the basic structure of major topic headings. That would be my approach rather than use the Normal (default) template. A custom template is typically tailored for a specific project, and any changes to it relate to changing needs of that project. The Normal template has a tendency to change over time as users alter style definitions for other unrelated projects.



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial