Insert TOC to use Heading Style TOC 3 only

dd88 96 Reputation points
2021-05-30T05:34:45.767+00:00

Word 2016

I have an existing TOC in my document that use heading style TOC 1 & TOC 2.

I would like to create a custom TOC.
using TC field codes within a bookmark.
The TOC to use only the heading style TOC 3

this is my toc fieldcode

{ TOC \b bookmarkName \f \n \h \z }

When I create the fieldcode using either:
Insert ribbon, Quick Parts, Field, Index and Tables
or
References, Table of Contents, Custom Table of Contents ...

The toc inserted displays the content correctly.
However the TOC heading style by default is always TOC 1.

I would like the TOC heading to be TOC 3. This allows me to format TOC 3 differently.
I want to avoid writing code to update the custom TOC to use heading style TOC 3.

When I use the switch \ l
eg

{ TOC \b bookmarkName \l 3 }

the result - displays Error! Not a valid heading level range.

How can I do this.

TIA

Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
997 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Stefan Blom 2,596 Reputation points MVP
    2021-05-30T12:25:50.81+00:00

    To create a TOC that references level 3 (Heading 3) paragraphs in a bookmarked range, use the following field code:

    { TOC \o "3-3" \b "BookmarkNameHere" \h }

    The \h switch creates a hyperlinked TOC. You can omit that switch if you wish.

    2 people found this answer helpful.
    0 comments No comments

  2. dd88 96 Reputation points
    2021-06-06T03:54:45.347+00:00

    Thank you all

    @ CharlesKenyon-8472 thank you I came across Suzannes detailed page

    @Stefan Blom

    this is my updated fieldcode

    { TOC \o "3-3" \b "bookmarkName" \f \n \h \z }

    When I update the toc, the results are updates the fieldcode and TOC 1 heading style is still applied, and not heading style TOC 3


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.