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

Column.Cells Property (Publisher)

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

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