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

CellRange.Merge Method (Publisher)

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

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

Syntax

expression. Merge

_expression_A variable that represents a CellRange object.

Example

This example merges the first two cells in the first two rows of the specified table.

Sub MergeCells() 
 ActiveDocument.Pages(1).Shapes(2).Table _ 
 .Cells(StartRow:=1, StartColumn:=1, _ 
 EndRow:=2, EndColumn:=2).Merge 
End Sub
© 2018 Microsoft