Selection.TableCellRange Property (Publisher)

Returns a CellRange object that represents the cells in a table selection.


expression. TableCellRange

expression A variable that represents a Selection object.

Return Value



This example fills the table cells in a selection.

Sub FillTableCellRange() 
 Dim intCount As Integer 
 With Selection 
 If .Type = pbSelectionTableCells Then 
 With .TableCellRange 
 For intCount = 1 To .Count 
 .Item(intCount).Fill.ForeColor.RGB = RGB _ 
 (Red:=0, Green:=255, Blue:=255) 
 Next intCount 
 End With 
 End If 
 End With 
End Sub