Class Rows (Word VBA)

A collection of Row objects that represent the table rows in the specified selection, range, or table.

The classes Range, Selection and Table. give access to class Rows


Dim rws as Rows
Set rws = ActiveDocument.Range.Rows

For Each

Here is an example of processing the Rows items in a collection.


Dim rw As Row
For Each rw In ActiveDocument.Range.Rows
	
Next rw

Methods

Add - Returns a Row object that represents a row added to a table.

ConvertToText - Converts rows in a table to text and returns a Range object that represents the delimited text.

Delete - Deletes the specified table rows.

DistributeHeight - Adjusts the height of the specified rows or cells so that they're equal.

Item - Returns an individual Row object in a collection.

Select - Selects a collection of rows in a table.

SetHeight - Sets the height of table rows.

SetLeftIndent - Sets the indentation for a row or rows in a table.

Properties

Alignment returns or sets a WdRowAlignment constant that represents the alignment for the specified rows.

AllowBreakAcrossPages true if the text in a table row or rows are allowed to split across a page break.

AllowOverlap returns or sets a value that specifies whether the specified rows can overlap other rows.

Borders returns a Borders collection that represents all the borders for the specified object.

Count returns a Long that represents the number of rows in the collection.

DistanceBottom returns or sets the distance (in points) between the document text and the bottom edge of the specified table.

DistanceLeft returns or sets the distance (in points) between the document text and the left edge of the specified table.

DistanceRight returns or sets the distance (in points) between the document text and the right edge of the specified table.

DistanceTop returns or sets the distance (in points) between the document text and the top edge of the specified table.

First returns a Row object that represents the first item in the Rows collection.

HeadingFormat true if the specified row or rows are formatted as a table heading.

Height returns or sets the height of the specified rows in a table.

HeightRule returns or sets the rule for determining the height of the specified cells or rows.

HorizontalPosition returns or sets the horizontal distance between the edge of the rows and the item specified by the RelativeHorizontalPosition property.

Last returns the last item in the Rows collection as a Row object.

LeftIndent returns or sets a Single that represents the left indent value (in points) for the specified table rows.

NestingLevel returns the nesting level of the specified table rows.

RelativeHorizontalPosition specifies the relative horizontal position of a group of rows.

RelativeVerticalPosition specifies the relative vertical position of a group of rows.

Shading returns a Shading object that refers to the shading formatting for the specified object.

SpaceBetweenColumns returns or sets the distance (in points) between text in adjacent columns of the specified row or rows.

TableDirection returns or sets the direction in which Microsoft Word orders cells in the specified table or row.

VerticalPosition returns or sets the vertical distance between the edge of the rows and the item specified by the RelativeVerticalPosition property.

WrapAroundText returns or sets whether text should wrap around the specified rows.