Column.Cells Property (Publisher)

Returns a CellRange object that represents the cell or cells in a column of a table.

Syntax

expression. Cells

expression A variable that represents a Column object.

Example

This example merges the first and second cells in the first column of the specified table.

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

This example applies a thick border outline to the first cell in the second column of the specified table.

Sub OutlineBorderCell() 
 With ActiveDocument.Pages(1).Shapes(2).Table.Columns(2).Cells(1) 
 .BorderLeft.Weight = 5 
 .BorderRight.Weight = 5 
 .BorderTop.Weight = 5 
 .BorderBottom.Weight = 5 
 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.