Cell.Select method (Publisher)
Selects the specified object.
Syntax
expression.Select
expression A variable that represents a Cell object.
Example
This example selects the upper-left cell from a table that has been added to the first page in the active publication.
Dim shpTable As Shape
Dim cllTemp As Cell
With ActiveDocument.Pages(1).Shapes
Set shpTable = .AddTable(NumRows:=3, NumColumns:=3, _
Left:=100, Top:=100, Width:=150, Height:=150)
Set cllTemp = shpTable.Table.Cells.Item(1)
cllTemp.Select
End With
This example selects the first column from a table that has been added to the first page in the active publication.
Dim shpTable As Shape
Dim crTemp As CellRange
With ActiveDocument.Pages(1).Shapes
Set shpTable = .AddTable(NumRows:=3, NumColumns:=3, _
Left:=100, Top:=100, Width:=150, Height:=150)
Set crTemp = shpTable.Table.Cells(StartRow:=1, _
StartColumn:=1, EndRow:=3, EndColumn:=1)
crTemp.Select
End With
This example selects the first five characters in shape one on page one of the active publication.
ActiveDocument.Pages(1).Shapes(1).TextFrame _
.TextRange.Characters(1, 5).Select
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.