Table of contents
Collapse the table of content
Expand the table of content

Cell.Merge Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

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


expression. Merge( MergeTo)

_expression_A variable that represents a Cell object.


NameRequired/OptionalData TypeDescription
MergeToRequiredCellThe cell to be merged with; must be adjacent to the specified cell or an error occurs.


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
© 2018 Microsoft