Can we limit TOC only to H1, H2, and H3?

Hi there,

I have a doc template with TOC.
Then i insert HTML and do UpdateFields() for the TOC.
All is working well, but i found some words those are neither H1, H2, nor H3 included in The TOC.
Can we limit TOC only to H1, H2, and H3?

regards

DISP SRA (15).docx (263.3 KB)

@ibox In your document TOC field is the following { TOC \o 1-5 \h \z \u }, it means it uses heading from first to fifth level. Change the TOC field like this { TOC \o 1-3 \h \z \u }. Please see TOC field documentation for more information.

Thank you Sir.

But i am still new on MS Word.
Where i can find the {TOC \0…}?
How to change it?

regards

@ibox You should press Alt+F9 to see field codes in MS Word.

Thank you, Sir

I’ll change the template

1 Like