Cell object (Publisher)
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.
Remarks
Use Cells (index), where index is the cell number, to return a Cell object.
Example
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
Methods
Properties
- Application
- BorderBottom
- BorderDiagonal
- BorderLeft
- BorderRight
- BorderTop
- CellTextOrientation
- Column
- Diagonal
- Fill
- HasText
- Height
- MarginBottom
- MarginLeft
- MarginRight
- MarginTop
- Parent
- Row
- Selected
- TextRange
- VerticalTextAlignment
- Width
See also
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.