DocInsertToc

DocInsertToc inserts or updates a Table of Contents.

bool = DocInsertToc(hDoc)

Return Value

bool.

Parameters

hDoc

Identifies the document.

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: (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.

History

Version Description
5.9.3 New

id-1588476