SetHeight Method Example

This example creates a table and then sets a fixed row height of 0.5 inch (36 points) for the first row.

Set newDoc = Documents.Add
Set aTable = _
    newDoc.Tables.Add(Range:=Selection.Range, NumRows:=3, _
    NumColumns:=3)
aTable.Rows(1).SetHeight RowHeight:=InchesToPoints(0.5), _
    HeightRule:=wdRowHeightExactly

This example sets the row height of the selected cells to at least 18 points.

If Selection.Information(wdWithInTable) = True Then
    Selection.Cells.SetHeight RowHeight:=18, _
        HeightRule:=wdRowHeightAtLeast
Else
    MsgBox "The insertion point is not in a table."
End If