Class Row (Word VBA)

The class Row represents a row in a table. The Row object is a member of the Rows collection. The Rows collection includes all the rows in the specified selection, range, or table.

Class Cell gives access to class Row.

To use a Row class variable it first needs to be instantiated, for example

Dim rw as Row
Set rw = ActiveDocument.Range.Rows(Index:=1)

The following procedures can be used to set variables of type Row: Cell.Row, Next, Previous, Rows.Add, Rows.First, Rows.Item and Rows.Last.

For Each

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

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


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

Delete - Deletes the specified table row.

Select - Selects the specified table row.

SetHeight - Sets the height of a table row.

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


Range (Default member) - Returns a Range object that represents the portion of a document that is contained within the specified table row.

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.

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

Cells returns a Cells collection that represents the table cells in a column, row, selection, or range.

HeadingFormat true if the specified row or rows are formatted as a table heading. Rows formatted as table headings are repeated when a table spans more than one page. Can be True, False or wdUndefined.

Height returns or sets the height (in points) of the specified row in a table.

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

ID returns or sets the identifying label for the specified table row when the document is saved as a webpage.

Index returns a Long that represents the position of an item in a collection.

IsFirst true if the specified row is the first one in the table.

IsLast true if the specified row is the last one in the table.

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

NestingLevel returns the nesting level of the specified table row.

Next returns a Row object that represents the table row that is next in the collection of rows in a table.

Previous returns a Row object that represents the table row that is previous to the specified row.

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.

Borders - A collection of Border objects that represent the borders of an object.

Cells - A collection of Cell objects in a table column, table row, selection, or range.

Range - Represents a contiguous area in a document. Each Range object is defined by a starting and ending character position.

Shading - Contains shading attributes for an object.