InitTable Method

The InitTable method initializes the document as a table of RowCount x ColCount.

Syntax

C++:

HRESULT InitTable (long RowCount, long ColCount)

C#:

void InitTable (int rowCount, int colCount)

VB:

Sub InitTable (RowCount As Long, ColCount As Long)

Parameters

RowCount

The number of rows.

ColCount

The number of columns.

 

Example in VB:

With PDF1

' initializes the document as a table of 10 rows x 3 columns

.InitTable 10, 3

' set the page to PageView display

.DoCommandTool (acCommandToolPageView)

' set the background color of cell(1,1) to red

.ObjectAttribute("Cells[1,1]", "BackColor") = &HFF&

' draw horizontal and vertical border lines of the cell(3,2)

.ObjectAttribute("Cells[3,2]", "HorzBorders") = 1  ' top only

.ObjectAttribute("Cells[3,2]", "VertBorders") = 3  '  left & right

' refresh the display

.Refresh

End With