Creating a Custom TOC that Includes Portions of Paragraphs

Written by Allen Wyatt (last updated June 12, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


6

Roger is trying to create a customized table of contents. This TOC needs to include not only full paragraphs, but also selected text within a Body Text paragraph. For instance, within the text "Work to be done at City Memorial Hospital during the month of May..." Roger would want only the hospital name to appear in the TOC. He could create a character style to apply to the hospital name, but Word only shows paragraph styles as being usable in a custom TOC. Roger wonders if there is a way around this.

There are actually two ways around this particular issue. The first involves the manual (or semi-manual) creation of a TOC, and the second involves a very esoteric feature called "style separators."

The Manual Method

There are two primary ways that a TOC can be created in Word—using styles or using TC field codes. Most people use the styles approach because it is fast and easy. But if you need special text in your TOC (as Roger does), then using TC fields can be helpful. Follow these steps to mark an entry:

  1. In the Body Text paragraph, select the actual text you want included in the TOC. In Roger's case, he would select the text "City Memorial Hospital."
  2. Press Alt+Shift+O. Word displays the Mark Table of Contents Entry dialog box. The Entry field should contain the text you selected in step 1. (See Figure 1.)
  3. Figure 1. The Mark Table of Contents Entry dialog box.

  4. Adjust the Level setting to indicate the TOC level you want this text treated as.
  5. Click the Mark button. Word places the proper field code in your document.
  6. Click the Close button to dismiss the dialog box.

You can continue to mark as many other text phrases as desired. When you are ready to add your TOC, then you'll need to modify your process only a bit to take advantage of the entries you marked:

  1. Position the insertion point where you want your TOC.
  2. Display the References tab of the ribbon.
  3. At the left of the ribbon click the Table of Contents tool. Word displays a few options.
  4. Depending on your version of Word, click either Custom Table of Contents or Insert Table of Contents. Word displays the Table of Contents dialog box.
  5. Click the Options button. Word displays the Table of Contents Options dialog box. (See Figure 2.)
  6. Figure 2. The Table of Contents Options dialog box.

  7. In the list of available options, make sure the Table Entry Fields check box is selected.
  8. Click on OK to close the Table of Contents Options dialog box.
  9. Click on OK to close the Table of Contents dialog box and generate the table of contents.

The TOC that is generated will contain both headings (as normal) and the text phrases you marked in your regular text.

Using Style Separators

Styles are extremely powerful in Word. That being said, perhaps the most esoteric—nay, obscure and hidden—feature of styles is something called "style separators." The only real use for these that I could find has to do with the exact scenario that Roger is facing—putting only some text from the middle of the heading into the TOC.

  1. Position the insertion point immediately after the text you want to add to your TOC. (In Roger's case, he would place the insertion point just after the word "Hospital" and before the space that follows that word.)
  2. Press Enter once.
  3. Position the insertion point just before the text you want to add to your TOC. (Again, in Roger's case, he would place the insertion point just before "City Memorial Hospital.")
  4. Press Ctrl+Alt+Enter. Word does something that, at first, may seem strange—it undoes the Enter you pressed in step 2 and places a pilcrow (a backwards P) at that point. If you have non-printing characters turned on, you can tell that what Word did was to replace the normal hard-return, end-of-paragraph mark with what is called a "style separator." You can tell the pilcrow used by the style separator from the pilcrow used for the end-of-paragraph mark because this style separator's pilcrow is surrounded by a small box made up of dots. (Well, that and the fact it is in the middle of the paragraph rather than at the end.) (See Figure 3.)
  5. Figure 3. Style separator.

  6. Select the newly inserted pilcrow like you would select any other character and then press Ctrl+C. This copies the character to the Clipboard.
  7. Position the insertion point, one more time, immediately before the text you want in your TOC.
  8. Press Ctrl+V to paste the pilcrow character at that point. Your text phrase should now be surrounded by the two pilcrow characters. (See Figure 4.)
  9. Figure 4. Style separators surrounding your phrase.

  10. Position the insertion point within the text you want in your TOC. (The insertion point should be within the text between the two pilcrow characters.)
  11. Apply a heading style (Heading 1, Heading 2, Heading 3, etc.).

That's it. If you now generate a TOC based on headings (like normal), it will contain just the text bounded by the two pilcrow characters. These characters are known as "style separators," and they allow you to apply multiple paragraph styles within a single paragraph. The problem, of course, is that when you do this, your paragraph looks funky because heading styles normally have a markedly different appearance from regular text. (See Figure 5.)

Figure 5. Applying multiple paragraph styles to the same paragraph.

This means you'll need to either manually override the styling (select the heading text and use the controls on the Home tab of the ribbon to make it look like the surrounding text) or create a few new styles to "fake" the headings and then add those fake heading styles to the Table of Contents Options dialog box to ensure they are added to the TOC.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13870) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing a List of AutoCorrect Entries

Want a printed record of the AutoCorrect entries you've created in Word? There is no built-in way to do it, but you can ...

Discover More

Understanding Ascending and Descending Sorts

When you sort information, Excel follows a set pattern of how your data is organized. This tip illuminates the burning ...

Discover More

Can't Enter Years in a Cell

Sometimes getting the right thing to show up in a cell can be a bit tricky when working with dates. If you enter a year ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Mixed Page Number Formats in a TOC

When you create a Table of Contents for a document that contains multiple sections, the page numbers in that TOC should ...

Discover More

Stopping the TOC from Appearing in the Navigation Pane

When you create a TOC for your document, the information in the TOC is based on the headings in your document. If you ...

Discover More

Locking Lines in a TOC

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 More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2021-06-14 15:33:09

Beej

Huh. I contributed to this answer but basically just repeated the ideas in the manual method.

I'd never even heard of style separators until reading the second suggestion. I learned something new today!


2021-06-14 04:04:46

Ken Endacott

A TC field can give text in the TOC that is not necessarily identical to the text in the heading, for example “City Memorial Hospital – May”.


2021-06-13 13:53:00

Paul Stregevsky

Figure captions also benefit from style separators.
Use the "Caption" paragraph style for part 1, which will generate the list of figures ("Figure 3. Our redesigned form is saving money.").
Use a new style--say, Caption Part 2--to put meat on the bones ("The form is so easy to use, most customers are using 30 percent fewer Help Desk agents.")


2021-06-13 13:45:47

Paul Stregevsky

Great tip, Brian Lair--and timely. I'm about to revamp my employer's proposal template. Thanks to your tip, I'm going to make our Heading 3 a run-in heading and see if they'll accept it. If they do, that will free up a 0.3 to 0.5 page in a 30-page-limit proposal.


2021-06-13 10:20:12

Brian Lair

Thanks, Allen (and Malcolm, in comments) for explaining this really interesting feature!


2021-06-12 05:54:17

Malcolm Patterson

Style separators are also a convenient way to "run in" side heads. These differ from other headings in that the paragraph of associated text begins on the same line. Usually the side head itself is separated from the paragraph that follows by a period, colon, or em dash. It's often emphasized with bold or italic font attributes.

Inserting a style separator after the side head makes it easy to maintain consistent formatting of run-in side heads throughout the document, controlling them with paragraph styles. It's cleaner than manual formatting approaches; it won't interfere with the formatting of the text that follows.


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.