Share via


Selection.TableCellRange Property

Publisher Developer Reference

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

Syntax

expression.TableCellRange

expression   A variable that represents a Selection object.

Return Value
CellRange

Example

This example fills the table cells in a selection.

Visual Basic for Applications
  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

See Also