Partager via


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

Concepts

Cells Collection Object

Cells Object Members