Cells.SetHeight method (Word)

Sets the height of table cells.

Syntax

expression. SetHeight( _RowHeight_ , _HeightRule_ )

expression Required. A variable that represents a 'Cells' collection.

Parameters

Name Required/Optional Data type Description
RowHeight Required Variant The height of the row or rows, in points.
HeightRule Required WdRowHeightRule The rule for determining the height of the specified cells.

Remarks

Setting the SetHeight property of a Cells object automatically sets the property for the entire row.

Example

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

See also

Cells Collection 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.