PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Inserts a table of contents in a Word Processing document.
Example
doc is Document
...
// Define the table of contents
tdm is an docTableOfContents
tdm.WithPageNumber = True
tdm.StylesPerLevel[1]= styleTOCDefault1
tdm.StylesPerLevel[2]= styleTOCDefault2 + RC + "MySubTitle
tdm.StylesPerLevel[3]= "MySubSubLiter"
 
// Insert table of contents at the beginning of the document
fDocBeginning is docFragment = doc[1 ON 0]
DocInsertTableOfContents(fDocBeginning, toc)
doc is Document
...
 
// Insert an automatic table of contents
// (3 levels of headings are taken into account)
DocInsertTableOfContents(doc[1 ON 0], 3)
Syntax

Inserting an automatic table of contents Hide the details

<Result> = DocInsertTableOfContents(<Fragment> [, <Number of levels>])
<Result>: docFragment variable
docFragment variable with the inserted fragment.
<Fragment>: docFragment variable
Name of the docFragment variable to use. The content of this fragment will be replaced by the automatic table of contents.
<Number of levels>: Optional integer
Number of levels (between 1 and 9). This number corresponds to the number of levels of headings taken into account (Heading 1, Heading 2, etc.). The default value is 2.

Inserting a table of contents defined via a docTableOfContents variable Hide the details

<Result> = DocInsertTableOfContents(<Fragment> , <Table of contents>)
<Result>: docFragment variable
docFragment variable with the inserted fragment.
<Fragment>: docFragment variable
Name of the docFragment variable to use. The content of this fragment will be replaced by the table of contents.
<Table of contents>: docTableOfContents variable
Name of the docTableOfContents variable that replaces the specified fragment.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment