Table of Contents Question

J

jerem

I'm trying to generate a TOC with 2 levels (from Heading Styles), however I
don't want page numbers appearing for level 1. Right now the Code looks like
this { TOC \o "1-2" \h\z\u } and it is generating two levels with page
numbers for each level. I tried to look this up in Word's Help area and it
says to use \n if you don't want page numbers, however, when using this it
takes out page numbers entirely. I want page numbers for level 2 but not for
level 1. Can anyone tell me how to specify that? Also, I've tried to find a
list on websites and in the Word help feature that delineates switches that
are TOC specific and that gives examples of what the switch does and examples
of the exact use of them - haven't had much luck there. Any tips pointing me
in the right direction would be appreciated. Thanks in advance.
 
D

Doug Robbins - Word MVP

Modify the TOC 1 Style so that the tab stop for the page number is off the
page and so that it does not have a leader.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
S

Stefan Blom

Or add \n "1-1" to the TOC field code to suppress the page numbers for level
1.

--
Stefan Blom
Microsoft Word MVP


in message
 
J

jerem

Hi Doug,
This is certainly a novel idea. Did not expect this response, was expecting
a switch to turn off level 1 page numbering. I'm going to try Stefan Blom's
suggestion, however, this little trick is worthy of jotting down for future
reference. Thanks.
 
J

jerem

Works like a charm. Thanks.

Stefan Blom said:
Or add \n "1-1" to the TOC field code to suppress the page numbers for level
1.

--
Stefan Blom
Microsoft Word MVP


in message
 
J

Jean-Guy Marcil

jerem said:
Hi Doug,
This is certainly a novel idea. Did not expect this response, was expecting
a switch to turn off level 1 page numbering. I'm going to try Stefan Blom's
suggestion, however, this little trick is worthy of jotting down for future
reference. Thanks.

You would need Doug's "trick" if you had a complex TOC that would require
that you hide the page numbers for levels 1, 2 and 4 in a 5-level TOC. In
such cases, you can use the \n switch for levels 1 and 2, but not for 4
because only one \n switch is allowed and it must be for consecutive levels.
So, you would set your TOC with the \n switch for levels 1 and 2, and use
Doug's idea for level 4.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top