Cell.Selected Property (Publisher)

Returns True if a cell is selected. Read-only Boolean.


expression. Selected

expression A variable that represents a Cell object.


This example determines if a cell in the specified table is selected and if it is, enters text into the cell.

Sub IsCellSelected() 
 Dim cel As Cell 
 With ActiveDocument.Pages(1).Shapes(1).Table 
 For Each cel In .Cells 
 If cel.Selected Then 
 cel.TextRange.Text = "This cell is selected." 
 End If 
 Next cel 
 End With 
End Sub