Selection.Rows property (Word)

Returns a Rows collection that represents all the table rows in a range, selection, or table. Read-only.

Syntax

expression.Rows

expression A variable that represents a Selection object.

Remarks

For information about returning a single member of a collection, see Returning an object from a collection.

Example

This example places a border around the cells in the row that contains the insertion point.

Selection.Collapse Direction:=wdCollapseStart 
If Selection.Information(wdWithInTable) = True Then 
 Selection.Rows(1).Borders.OutsideLineStyle = wdLineStyleSingle 
Else 
 MsgBox "The insertion point is not in a table." 
End If

See also

Selection Object

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.