Link to home
Start Free TrialLog in
Avatar of rogerdjr
rogerdjrFlag for United States of America

asked on

Word Custom Table of Contents

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
Sample-TOC-Process.docx
Avatar of Eric Fletcher
Eric Fletcher
Flag of Canada image

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.
Avatar of rogerdjr

ASKER

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?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Eric Fletcher
Eric Fletcher
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks