Software

Use a custom style to annotate a Word table of contents

You can enhance a table of contents by generating summary information for specific sections. And thanks to Word's custom style capabilities and TOC features, the process is straightforward.

hero
Image: iStockphoto.com/Ahlapot

Adding a simple table of contents (TOC) to a Word document is easy, but the basic list of sections and page numbers won't always be adequate. For instance, you might want to add a short summary statement to a few (or all) sections in the TOC. In this article, I'll show you how to define and then apply a custom style you can map to your TOC for this purpose.

I'll be working with Word 2013 on a Windows 7 system. You can work with any short document that uses the built-in heading styles or you can download the demonstration .docx or .doc file. Instructions for earlier versions are included when significantly different. This article assumes you know how to generate a TOC. If you don't, please read How to insert a table of contents into a Word document first.

An overview

Adding an annotation to the TOC is a three-step process:

    1. Create a custom style for the summarizing text and apply the style appropriately.
    2. Map the custom style to the TOC.
    3. Generate the TOC.

    After mapping the custom style to a specific TOC level, Word copies that styled content into the TOC at the specified level (that will make more sense later) when you generate or update the TOC. You can modify the formatting of the summarizing text at the TOC level without changing its formatting within the body of the document, and I'll show you how to do that as well.

    Generate the TOC

    To get started, we need to generate a simple TOC similar to the one shown in Figure A. Word creates a TOC using styled text (using one of the built-in heading styles). You can update the TOC by changing a style or modifying a style's attributes. We explain how to do the latter in the first article in this series, Three advanced tips for Word's table of contents feature. To simplify our example, we're adding the summarizing statement to just one level of the TOC.

    Figure A

    Figure A

    Start by generating a simple TOC.

    The example document uses three heading styles: Heading 1, Heading 2, and Heading 3. To generate the TOC, position the cursor, click the References tab, click Table Of Contents in the Table Of Contents group, and choose an option from the resulting gallery. If you're using Word 2003, choose Reference from the Insert menu and then choose Index And Tables. Click the Table Of Contents tab and then click OK.

    Create the style

    You'll need a custom style for the summarizing statement. To create this style, highlight one instance of the text you want to include in the TOC and do the following:

      1. Open the Styles gallery and choose Create A Style (Figure B). Word will highlight the style of the selected text in the Styles pane. In Word 2010, choose Save Selection As A New Quick Style. In Word 2003, choose Styles And Formatting from the Format menu and then click New Style in the Styles And Formatting pane.
      2. In the resulting dialog, give the style a name, such as TOC Summary (Figure C). We don't want to modify the original attributes so don't click Modify. We're creating a duplicate style named TOC Summary.
      3. Click OK.

      Figure B

      Figure B

      Figure C

      Figure C

      The selected text doesn't look any different; we don't want it to. However, it now has two styles: Normal and TOC Summary.

      Strictly speaking, you can create the custom style without selecting any text, but the above route combines two tasks, so it's more efficient. We now have a custom style and some styled text using the new style.

      Map the new style

      With the new style in place, you're ready to map that style to the TOC. Doing so is simple, but the process might be unfamiliar to you. In last month's article, I used the same process to add a non-heading style to the TOC. In this article, we'll use it to add the summary style in the same way. Now, let's map that style as follows:

        1. Click the References tab and choose Custom Table Of Contents. In Word 2010, choose Insert Table Of Contents. In Word 2003, choose Reference from the Insert menu and then choose Index And Tables.
        2. In the resulting dialog, click Options. Currently, three styles are mapped to the TOC (Figure D). Heading 1 is the first level; Heading 2 is the second level; Heading 3 is the third level.
        3. To add a fourth level, scroll down until you expose the TOC Summary style and enter the value 4 (Figure E).
        4. Click OK twice and then click Yes to confirm the TOC update. Figure F shows the new TOC with the summary statement.

        Figure D

        Figure D

        Figure E

        Figure E

        Figure F

        Figure F

        Add a summary statement to the TOC.

        At this point, you could apply the TOC Summary style to more text, but you don't have to. Once the two above steps are completed, you can add and remove annotated text at any time.

        Change the format

        Earlier, when we created the new style, we didn't change the format. You can however, modify the summary statement's format at the TOC level. This next step might seem a bit confusing. But remember, we're modifying the TOC's fourth-level style, not the Normal-styled text within the body of the document.

        To modify the format for the style mapped to the TOC's fourth level (TOC Summary), do the following:

          1. Select the TOC and open the Styles pane (click the More button on the gallery).
          2. Select TOC 4 (the TOC's fourth level) and choose Modify from the dropdown list (Figure G).
          3. Use the Modify Style dialog to make the changes you want. I chose Italics and changed the Font Size to 8 (Figure H).
          4. Click OK. Figure I shows the updated TOC.

          Figure G

          Figure G

          Figure H

          Figure H

          Figure I

          Figure I

          Change the summarizing statement's attributes at the TOC level.

          Add more

          With the style in place, mapped, and modified, you can add as many annotations to the TOC as you need. Simply select the statement in the text, apply the TOC Summary style, and then update the TOC. Let's walk through a quick example:

            1. Select the first sentence in the Quick Themes section and then click TOC Summary in the Quick Styles Gallery to apply the style (Figure J).
            2. Select the TOC.
            3. Right-click and choose Update Field.
            4. Choose Update Entire Table in the resulting dialog (Figure K).
            5. Click OK and Word adds the new summary statement to the TOC (Figure L).

            Figure J

            Figure J

            Figure K

            Figure K

            Figure L

            Figure L

            Flexibility with ease

            Mapping a custom style to a TOC level is one of the most powerful TOC features Word offers. Once you're familiar with the steps, you'll be amazed at the ways you can customize a document's TOC. Remember, there are three simple steps:

              1. Create the custom style and apply it appropriately.
              2. Map the custom style to a TOC level.
              3. Generate the TOC.

              Once these pieces are in place, you can modify the summarizing statement's formatting and add or remove statements at any time.

              Send me your question about Office

              I answer readers' questions when I can, but there's no guarantee. When contacting me, be as specific as possible. For example, "Please troubleshoot my workbook and fix what's wrong" probably won't get a response, but "Can you tell me why this formula isn't returning the expected results?" might. Please mention the app and version you're using. Don't send files unless requested; initial requests for help that arrive with attached files will be deleted unread. I'm not reimbursed by TechRepublic for my time or expertise when helping readers, nor do I ask for a fee from readers I help. You can contact me at susansalesharkins@gmail.com.

              Also read...

              TOC savvy

              Are you a table of contents guru? Share your tips and shortcuts with fellow TechRepublic members.

              About Susan Harkins

              Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

              Editor's Picks

              Free Newsletters, In your Inbox