AddTable Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPFieldContents

Declaration

procedure AddTable(ColCount: Integer; RowCount: Integer; Border: WordBool; EventParam: Integer; CreateHeader: WordBool; CreateFooter: WordBool);

Description

This is a powerful and versatile method. It creates a table inside the merge field inside the mailmerge process. The callback OnCreateNewCell is triggered if EventParam was passed with a value != 0. So you can add the data and properties is a very efficient way.

Note

If you do not need to merge the template again we recommend to use DeleteFields. This makes sure there are no extra empty lines before and after the table which are required to host the field markers.

Parameters

ColCount

The count of columns which should be created

RowCount

The count of rows which should be created (not including header/footer rows). You can abort the creation in event OnCreateNewCell by changing the value of the boolen variable AbortAtRowEnd.

Border

Create a broder around cells. You can also set border attributes in event OnCreateNewCell.

EventParam

Parameter passed through to OnCreateNewCell. This event is not called if this parameter is 0.

CreateHeader

If true an extra header row with rownr=-1 will be created. The formatting routine is able to repeat header rows at the start of a page.

CreateFooter

If true an extra footer row with rownr=-2 will be created. The formatting routine is able to repeat footer rows at the start of a page. (This special feature is not supported by MSWord)

Category

Callback Functions

Table Support


[idh_iwpfieldcontents_addtable.htm]    Copyright © 2007 by WPCubed GmbH