TableMergeCells

Syntax

TableMergeCells

Remarks

Merges selected table cells in the same row into a single cell. Selections can extend over multiple rows; however, Word only merges cells in the same row. TableMergeCells generates an error if Word cannot merge cells — for example,
if only one cell is selected.

Example

This example either merges the currently selected cells or displays a message box if the command cannot be performed:


On Error Goto No
TableMergeCells
No:
If Err = 509 Then
    MsgBox "Sorry, can't merge."
End If

See Also

TableSplitCells