Height Property

Returns or sets the height of the specified object (in points unless otherwise noted), as shown in the following table.

Object Height
Application Returns or sets the height of the active document window. Read/write Long.
Cell, Cells Returns or sets the height of the specified cell or cells in a table. If the HeightRule property of the specified row is wdRowHeightAuto, Height returns wdUndefined; setting the Height property sets HeightRule to wdRowHeightAtLeast. Read/write Single.
CustomLabel Returns or sets the height of the specified custom mailing label. Read/write Single.
Frame Returns or sets the height of the specified frame. Read/write Single.
Frameset Returns or sets the height of the specified Frameset object. Read/write Float. The HeightType property determines the type of unit in which this value is expressed.
InlineShape Returns or sets the height of the specified inline shape. Read/write Single.
Page See below.
Row, Rows Returns or sets the height of the specified row or rows in a table. If the HeightRule property of the specified row is wdRowHeightAuto, Height returns wdUndefined; setting the Height property sets HeightRule to wdRowHeightAtLeast. Read/write Single.
Shape, ShapeRange Returns or sets the height of the specified shape. Read/write Single.
Task Returns or sets the height of the specified task window. Read/write Long.
Window Returns or sets the height of the window. You cannot set this property if the window is maximized or minimized. Use the UsableHeight property of the Application object to determine the maximum size for the window. Use the WindowState property to determine the window state. Read/write Long.

Page object: The Top and Left properties of the Page object always return 0 (zero) indicating the upper left corner of the page. The Height and Width properties return the height and width in points (72 points = 1 inch) of the paper size specified in the Page Setup dialog or through the PageSetup object. For example, for an 8-1/2 by 11 inch page in portrait mode, the Height property returns 792 and the Width property returns 612. All four of these properties are read-only.

Example

As it applies to the Rows object.

This example sets the height of the rows in the first table in the active document to at least 20 points.

ActiveDocument.Tables(1).Rows.Height = 20

As it applies to the Row object.

This example displays the height (in points) of the table row that contains the insertion point.

If Selection.Information(wdWithInTable) = True Then
    MsgBox Selection.Rows(1).Height
End If

As it applies to the Window object.

This example changes the height of the active window to fill the application window area.

With ActiveDocument.ActiveWindow
    .WindowState = wdWindowStateNormal
    .Height = Application.UsableHeight
End With

As it applies to the ShapeRange object.

This example inserts a picture as an inline shape and changes the height and width of the image.

Set aInLine = _
    ActiveDocument.InlineShapes.AddPicture( _
    FileName:="C:\Windows\Bubbles.bmp", _
    Range:=Selection.Range)
With aInLine
    .Height = 100
    .Width = 200
End With

As it applies to the Frameset object.

This example sets the height of the specified Frameset object to 25% of the window height.

With ActiveWindow.ActivePane.Frameset
    .HeightType = wdFramesetSizeTypePercent
    .Height = 25
End With

Applies to | Application Object | Cell Object | Cells Collection Object | CustomLabel Object | Frame Object | Frameset Object | InlineShape Object | Line Object | Page Object | Rectangle Object | Row Object | Rows Collection Object | Shape Object | ShapeRange Collection Object | Task Object | Window Object

See Also | AutoFit Method | DistributeHeight Method | HeightRule Property | LinesToDrop Property | PageHeight Property | Resize Method | SetHeight Method | Width Property