Cell.Merge method (Publisher)

Merges the specified table cell with another cell. The result is a single table cell.

Syntax

expression.Merge (MergeTo)

expression A variable that represents a Cell object.

Parameters

Name Required/Optional Data type Description
MergeTo Required Cell The cell to be merged with; must be adjacent to the specified cell or an error occurs.

Example

This example merges the first two cells of the first column of the specified table.

Sub MergeCell() 
 With ActiveDocument.Pages(1).Shapes(2).Table 
 .Rows(1).Cells(1).Merge MergeTo:=.Rows(2).Cells(1) 
 End With 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.