" /> " /> "/>

How can I create an automatic table of contents in docx without the text being bold?

20 Views Asked by At

I am using this code to generate an automatic table of contents in docx

<w:sdt>
            <w:sdtPr>
                <w:alias w:val="Summary" />
            </w:sdtPr>
            <w:sdtContent>
                <w:p>
                    <w:r>
                        <w:fldChar w:fldCharType="begin" w:dirty="true" />
                        <w:instrText xml:space="preserve">TOC h o &quot;1-5&quot;</w:instrText>
                        <w:fldChar w:fldCharType="separate" />
                    </w:r>
                </w:p>
                <w:p>
                    <w:r>
                        <w:fldChar w:fldCharType="end" />
                    </w:r>
                </w:p>
            </w:sdtContent>
        </w:sdt>

And so far everything is fine. The problem is that the table of contents text that is generated when opening Microsoft Word is in bold. I don't want it to be in bold.

0

There are 0 best solutions below