Syntax
TableInsertCells [.ShiftCells = number]
Remarks
Inserts cells above or to the left of the selected range of cells in a table. If the insertion point or selection is not in a table, an error occurs.
Argument | Explanation | |
.ShiftCells | Sets the direction to shift the cells in the selected range: 0 (zero) Shift the cells right. 1 or omitted Shift the cells down. 2 Insert an entire row. 3 Insert an entire column. |
Example
This example selects the current cell (using the predefined bookmark "\Cell") and the cell below it, and then inserts two new cells. The existing cells are shifted to the right. The If control structure makes sure the selection is entirely within a table before running TableInsertCells.
EditGoTo "\Cell" LineDown 1, 1 If SelInfo(12) = -1 Then TableInsertCells .ShiftCells = 0 Else MsgBox "Selection extends outside the table." End If
See Also
SelInfo(), TableInsertColumn, TableInsertRow