Cell Object [Publisher 2003 VBA Language Reference]
CellRange Cell Multiple objects |
Represents a single table cell. The Cell object is a member of the CellRange collection. The CellRange collection represents all the cells in the specified object.
Using the Cell object
Use Cells(index), where index is the cell number, to return a Cell object. This example merges the first two cells of 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 around 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
Properties | Application Property | BorderBottom Property | BorderDiagonal Property | BorderLeft Property | BorderRight Property | BorderTop Property | CellTextOrientation Property | Column Property | Diagonal Property | Fill Property | HasText Property | Height Property | MarginBottom Property | MarginLeft Property | MarginRight Property | MarginTop Property | Parent Property | Row Property | Selected Property | TextRange Property | VerticalTextAlignment Property | Width Property
Methods | Merge Method | Select Method | Split Method
Parent Objects
Child Objects | CellBorder Object | FillFormat Object | TextRange Object