Written by Allen Wyatt (last updated May 23, 2020)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and 2021
Have you ever created a table of contents for a document? Word makes it easy to do, as described in other issues of WordTips. What if you want to customize the way in which the tables are formatted by Word?
For most formatting of TOCs, all you need to do is change the various styles assigned to the TOC entries by Word. For a standard table of contents, the style TOC 1 is used to format the TOC entry corresponding to paragraphs formatted with the Heading 1 style. Likewise, TOC 2 corresponds to Heading 2, TOC 3 to Heading 3, etc.
To change how the TOC entry looks, just change the formatting for the TOC styles. These styles are the same as any other paragraph style, so you can change font characteristics, alignment, indentation, spacing, borders, bullets—the works.
One way you might want to customize your TOC is to change a particular TOC entry, so it doesn't show page numbers. A clever way to do this is to change the style for the TOC entry so that the page number prints to the right of the edge of your paper. Just adjust the tab stop defined in the appropriate TOC entry so it is at a setting such as 9 inches, which is outside the printing area of a normal sheet of paper.
The proper way to turn off page numbers for a particular TOC level is to use a switch in the field code used to create the TOC. For instance, if you wanted the TOC entries corresponding with Heading 2 paragraphs to not include page numbers, you could follow these steps:
{ TOC \o "1-3" \h \z }
{ TOC \o "1-3" \n "2-2" \h \z }
The resulting TOC should show page numbers on all TOC entries, except those that use the TOC 2 style.
For a great article on using switches with TOC entries, see the following Web page:
http://wordmvp.com/FAQs/Formatting/TOCSwitches.htm
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12887) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Word here: Customized Tables of Contents.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Want to "lock down" the lines in a TOC so that you cannot add new paragraph marks in the middle of one? You may not be ...
Discover MoreWord makes it easy to create a Table of Contents. If you want column headings in that table, getting them takes a bit of ...
Discover MoreAdding dot leaders before page numbers in a table of contents or table of authorities can make the finished table look ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-05-24 03:52:48
Steve Keeling
Thanks Alan
I've never been able to work out how to style tables of contents.
I think that your point that:
"TOC 1 is used to format the TOC entry corresponding to paragraphs formatted with the Heading 1 style. Likewise, TOC 2 corresponds to Heading 2, TOC 3 to Heading 3, etc."
could be the information I was missing.
I have tried fiddling with these styles while assuming that they appplied to whole ToCs and were just different types of styles for whole ToCs.
Now it makes sense.
Thanks a million and On-On!
Steve
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments