SplitTable Method

Microsoft Word Visual Basic

SplitTable Method

       

Inserts an empty paragraph above the first row in the selection. If the selection isn't in the first row of the table, the table is split into two tables.

Note   If the selection isn't in a table, an error occurs.

expression.SplitTable

expression   Required. An expression that returns a Selection object.

Example

If the selection is in a table, this example splits the table.

If Selection.Information(wdWithInTable) = True Then
    Selection.SplitTable
End If

This example splits the first table in the active document between the first and second rows.

ActiveDocument.Tables(1).Rows(2).Select
Selection.SplitTable