You can add a table of contents to the document. The table of contents is generated from existing headings in the document that are paragraphs of text to which preset styles Heading 1–Heading 5 or manually created heading styles have been applied.
By default, the table of contents is automatically generated from headings that have preset styles applied: Heading 1, Heading 2 and Heading 3. If necessary, you can change the heading styles from which the table of contents is generated and the number of levels in the table of contents.
The table of contents is updated automatically in the document. The update includes both heading text changes and page number changes.