Share via


Frame.HeightRule Property

Word Developer Reference

Returns or sets a WdFrameSizeRule that represents the rule for determining the height of the specified frame. Read/write.

Syntax

expression.HeightRule

expression   Required. A variable that represents a Frame object.

Example

This example sets both the height and width of the first frame in the active document to exactly 1 inch.

Visual Basic for Applications
  If ActiveDocument.Frames.Count >= 1 Then
    With ActiveDocument.Frames(1)
        .HeightRule = wdFrameExact
        .Height = InchesToPoints(1)
        .WidthRule = wdFrameExact
        .Width = InchesToPoints(1)
    End With
End If

See Also