Another TOC question

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Another TOC question

Post by agibsonsw »

Hello. Word 2007.
Is it possible to exclude a heading (2) from the table of contents? Perhaps using a field code around the heading?
I know that I could create a style which has the same formatting as Heading 2 and it won't appear in the TOC but I
was hoping to just say 'exclude this' somehow.
Similary, I have a paragraph which is a note that I'd like to include in the TOC without defining it as a style. (I would, however,
like it to appear as formatted in italics).

Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Another TOC question

Post by HansV »

Activate the References tab of the ribbon.
Click Table of Contents > Insert Table of Contents...
Click Options...
You see that levels have been indicated for Heading 1 to 3. If you clear the level for Heading 2, this style will not be included in the TOC.
If you want to include an arbitrary paragraph in the TOC, you must do two things:
- In the same Options dialog, tick the "Table entry fields" check box.
x325.png
- In the paragraph that you want to include, insert a TC field, specifying the text that you want to appear in the TOC (you can copy /paste the text of the paragraph) and the level; use a level that is not already used in the TOC, you can then format the corresponding TOCn style to be Italic.

To insert a field, activate the Insert tab of the ribbon, click Quick Parts | Field...
Select TC in the list of fields, enter the text in the Text entry box, and specify the Outline level. Then click OK.
x326.png
If you show hidden text in your document, you'll see something like this:
x327.png
When you refresh the TOC (update the entire table), the specified text should appear, and in this example you could modify the TOC5 style.
(As you see, working with TC fields is a hassle, it's much easier to use a heading style)
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Another TOC question

Post by agibsonsw »

Hello and thank you very much.
I'm using Heading 1 and 2 for the TOC, so if I want to exclude one of my Heading 2 headings I see that I have to re-name it as a different
style.
Ta, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78531
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Another TOC question

Post by HansV »

Indeed; I don't think you can exclude an individual heading paragraph from the TOC if its style is included in the TOC.
Best wishes,
Hans