The Split method applies to (among others) the Cell object, the Cells collection object, and the Table object. For a Cell object, the syntax is:
This will split the cell into multiple cells. For a Cells collection, the syntax is:
NumRows, NumColumns, MergeBeforeSplit)
In this case, the method splits a range of cells. Finally, for the Table object, the syntax is:
In this case, the method inserts an empty paragraph immediately above the specified row in the table, thus splitting the table in two. The Split method returns a Table object that denotes the lower table. For example, assuming that the insertion point lies within the list of column object members earlier in this chapter, the code:
Dim tbl As Table Dim tbl2 As Table Selection.Expand wdTable ' Select table Set tbl = Selection.Tables(1) Set tbl2 = tbl.Split(3)
turns that table into two tables, as shown in Figure 16-2.
Figure 16-2. A table split into two parts
The various parameters of the Split method are:
The number of columns that the cell or group of cells is to be split into.
The number of rows that the cell or group of cells is to be split into.
Set to True to merge the cells with one another before splitting them.
The row at which the table is split. This row becomes part of the lower ...