TOC styles, show only some page numbers

User avatar
Rubberduckone
Lounger
Posts: 34
Joined: 28 Oct 2011, 09:05

TOC styles, show only some page numbers

Post by Rubberduckone »

Hi,

Given TOC styles 1-9. I would like to have TOC 1 as a 'Superchapter' heading and subchapters displayed in styles lower in the hierarchy.

I would like that TOC 1 is without page numbers, but the other TOC styles do have it. Is this possible or is there another workaround like using {TC } field codes and switches...??

INTRO (TOC1)
chapter 1.............3
chapter 2.............5
MAIN STORY (TOC1)
chapter 3.............8
chapter 4.............10
etc.
Thanks and best regards
RD

A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.
If it is important to you, you'll find a way. If not you'll find an excuse.

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

Re: TOC styles, show only some page numbers

Post by HansV »

Yes, it's possible.
Press Alt+F9 to display field codes.
You'll see something like

{ TOC \o "1-3" \h \z \u }

TOC is the name of the field.
\o "1-3" specifies that levels 1 to 3 are included in the table of contents.
\h means that the page numbers act as hyperlinks.
\u specifies that the TOC will be built using paragraph outline levels.
\z tells Word to suppress the page numbers in web layout view.

To suppress page numbers for level 1, add

\n "1-1"

before the closing bracket:

{ TOC \o "1-3" \h \z \u \n "1-1"}

Press Alt+f9 to hide the field codes, then F9 to update the TOC.
Best wishes,
Hans