<!DOCTYPE html><htmlclass="default"lang="en"data-base="../"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>ITableOfContentsOptions | docx</title><metaname="description"content="Documentation for docx"/><metaname="viewport"content="width=device-width, initial-scale=1"/><linkrel="stylesheet"href="../assets/style.css"/><linkrel="stylesheet"href="../assets/highlight.css"/><scriptdefersrc="../assets/main.js"></script><scriptasyncsrc="../assets/icons.js"id="tsd-icons-script"></script><scriptasyncsrc="../assets/search.js"id="tsd-search-script"></script><scriptasyncsrc="../assets/navigation.js"id="tsd-nav-script"></script><scriptasyncsrc="../assets/hierarchy.js"id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme=localStorage.getItem("tsd-theme")||"os";document.body.style.display="none";setTimeout(()=>window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><headerclass="tsd-page-toolbar"><divclass="tsd-toolbar-contents container"><ahref="../index.html"class="title">docx</a><divid="tsd-toolbar-links"></div><buttonid="tsd-search-trigger"class="tsd-widget"aria-label="Search"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"aria-hidden="true"><usehref="../assets/icons.svg#icon-search"></use></svg></button><dialogid="tsd-search"aria-label="Search"><inputrole="combobox"id="tsd-search-input"aria-controls="tsd-search-results"aria-autocomplete="list"aria-expanded="true"autocapitalize="off"autocomplete="off"placeholder="Search the docs"maxLength="100"/><ulrole="listbox"id="tsd-search-results"></ul><divid="tsd-search-status"aria-live="polite"aria-atomic="true"><div>Preparing search index...</div></div></dialog><ahref="#"class="tsd-widget menu"id="tsd-toolbar-menu-trigger"data-toggle="menu"aria-label="Menu"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"aria-hidden="true"><usehref="../assets/icons.svg#icon-menu"></use></svg></a></div></header><divclass="container container-main"><divclass="col-content"><divclass="tsd-page-title"><ulclass="tsd-breadcrumb"aria-label="Breadcrumb"><li><ahref=""aria-current="page">ITableOfContentsOptions</a></li></ul><h1>Type Alias ITableOfContentsOptions</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Options according to this docs:
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L25">file/table-of-contents/table-of-contents-properties.ts:25</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="captionlabelincludingnumbers"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>caption<wbr/>Label<wbr/>Including<wbr/>Numbers</span><ahref="#captionlabelincludingnumbers"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">captionLabelIncludingNumbers</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\c option - Includes figures, tables, charts, and other items that are numbered
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L39">file/table-of-contents/table-of-contents-properties.ts:39</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="entriesfrombookmark"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>entries<wbr/>From<wbr/>Bookmark</span><ahref="#entriesfrombookmark"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">entriesFromBookmark</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\b option - Includes entries only from the portion of the document marked by
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L31">file/table-of-contents/table-of-contents-properties.ts:31</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="entryandpagenumberseparator"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>entry<wbr/>And<wbr/>Page<wbr/>Number<wbr/>Separator</span><ahref="#entryandpagenumberseparator"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">entryAndPageNumberSeparator</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\p option - Text in this switch's field-argument specifies a sequence of characters
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L86">file/table-of-contents/table-of-contents-properties.ts:86</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="headingstylerange"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>heading<wbr/>Style<wbr/>Range</span><ahref="#headingstylerange"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">headingStyleRange</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\o option - Uses paragraphs formatted with all or the specified range of builtin
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L80">file/table-of-contents/table-of-contents-properties.ts:80</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="hidetabandpagenumbersinwebview"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>hide<wbr/>Tab<wbr/>And<wbr/>Page<wbr/>Numbers<wbr/>In<wbr/>Web<wbr/>View</span><ahref="#hidetabandpagenumbersinwebview"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">hideTabAndPageNumbersInWebView</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>\z Hides tab leader and page numbers in web page view (§17.18.102).</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L121">file/table-of-contents/table-of-contents-properties.ts:121</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="hyperlink"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>hyperlink</span><ahref="#hyperlink"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">hyperlink</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>\h option - Makes the table of contents entries hyperlinks.</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L56">file/table-of-contents/table-of-contents-properties.ts:56</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="pagenumbersentrylevelsrange"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>page<wbr/>Numbers<wbr/>Entry<wbr/>Levels<wbr/>Range</span><ahref="#pagenumbersentrylevelsrange"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">pageNumbersEntryLevelsRange</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\n option - Without field-argument, omits page numbers from the table of contents.
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L71">file/table-of-contents/table-of-contents-properties.ts:71</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="preservenewlineinentries"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>preserve<wbr/>New<wbr/>Line<wbr/>In<wbr/>Entries</span><ahref="#preservenewlineinentries"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">preserveNewLineInEntries</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>\x Preserves newline characters within table entries.</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L116">file/table-of-contents/table-of-contents-properties.ts:116</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="preservetabinentries"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>preserve<wbr/>Tab<wbr/>In<wbr/>Entries</span><ahref="#preservetabinentries"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">preserveTabInEntries</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>\w Preserves tab entries within table entries.</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L111">file/table-of-contents/table-of-contents-properties.ts:111</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="seqfieldidentifierforprefix"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>seq<wbr/>Field<wbr/>Identifier<wbr/>For<wbr/>Prefix</span><ahref="#seqfieldidentifierforprefix"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">seqFieldIdentifierForPrefix</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\s option - For entries numbered with a SEQ field (§17.16.5.56), adds a prefix to the page number.
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L93">file/table-of-contents/table-of-contents-properties.ts:93</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="sequenceandpagenumbersseparator"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>sequence<wbr/>And<wbr/>Page<wbr/>Numbers<wbr/>Separator</span><ahref="#sequenceandpagenumbersseparator"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">sequenceAndPageNumbersSeparator</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\d option - When used with \s, the text in this switch's field-argument defines
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L45">file/table-of-contents/table-of-contents-properties.ts:45</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="styleswithlevels"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>styles<wbr/>With<wbr/>Levels</span><ahref="#styleswithlevels"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">stylesWithLevels</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-keyword">readonly</span><ahref="../classes/StyleLevel.html"class="tsd-signature-type tsd-kind-class">StyleLevel</a><spanclass="tsd-signature-symbol">[]</span></div><divclass="tsd-comment tsd-typography"><p>\t field-argument Uses paragraphs formatted with styles other than the built-in heading styles.
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L101">file/table-of-contents/table-of-contents-properties.ts:101</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="tcfieldidentifier"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>tc<wbr/>Field<wbr/>Identifier</span><ahref="#tcfieldidentifier"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">tcFieldIdentifier</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\f option - Includes only those TC fields whose identifier exactly matches the
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/dolanmiu/docx/blob/1403ac664be10a37403ba9c1b22fa5294a749e2d/src/file/table-of-contents/table-of-contents-properties.ts#L51">file/table-of-contents/table-of-contents-properties.ts:51</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><h3class="tsd-anchor-link"id="tcfieldlevelrange"><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>tc<wbr/>Field<wbr/>Level<wbr/>Range</span><ahref="#tcfieldlevelrange"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">tcFieldLevelRange</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>\l option - Includes TC fields that assign entries to one of the levels specified