Height Property

Applies To

Application object, Cell object, Cells collection object, CustomLabel object, Frame object, InlineShape object, Row object, Rows collection object, Shape object, ShapeRange collection object, Task object, Window object.

Description

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

Object

Height

Application

Returns or sets the height of the Word application 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.

InlineShape

Returns or sets the height of the specified inline shape. Read/write Single.

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 to determine the maximum size for the window. Use the WindowState property to determine the window state. Read/write Long.


See Also

AutoFit method, DistributeHeight method, HeightRule property, LinesToDrop property, PageHeight property, Resize method, SetHeight method, Width property.

Example

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
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
This example changes the height of the active window to fill the application window area.

With ActiveWindow
    .WindowState = wdWindowStateNormal
    .Height = Application.UsableHeight
End With
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