.. highlightlang:: us .. index:: DocInsertToc .. _docinserttoc: DocInsertToc ============ .. us.tag DocInsertToc NOTREADYENGLISH DocSet New593 :ref:`DocInsertToc` inserts or updates a Table of Contents. .. function:: bool = DocInsertToc(hDoc) .. us.return **Return Value** *bool*. .. us.params **Parameters** .. uparam:: hDoc Identifies the document. .. us.comment **Comment** The function uses an IPW/IPZ document as a template for the Table of contents. An example can be found in the UniPlot template directory: (:file:`contents-template-de.ipw`). The template must contain a table object with exactly 3 columns and at least 10 rows. The first row can contain a column description. The table object must have the name "contents-do-not-change". The first column will be filled with the page name, the second column with a page comment and the third column with the page number. The function searches for a text object with the name "$comment$" to use as a page comment. If you do not want to display the second column set the column width to 0. :: WriteProfileString("settings", "page-contents-name", "Contents"); The default placeholder can be replaced with the following function call: :: WriteProfileString("settings", "page-contents-placeholder", "$Title$"); The following function call sets the template. :: WriteProfileString("settings", "page-contents-template", "d:/toc-template.ipw"); Both settings are global settings. The information is saved in the windows registry. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.9.3 - New .. seealso:: :ref:`overview-documents`, :ref:`overview-document-pages`, :ref:`DocLoadPage` :sub:`id-1588476`