WidthRule Property

Applies To

Frame object.

Description

Returns or sets the rule used to determine the width of a frame. Read/write Long.

Can be one of the following WdFrameSizeRule constants.

Constant

Description

wdFrameAuto

Sets the width according to the width of the item in the frame.

wdFrameExact

Sets the width to an exact value specified by the Width property.

wdFrameAtLeast

Sets the width to a value equal to or greater than the value specified by the Width property.


See Also

DistributeWidth method, HeightRule property, Width property.

Example

This example sets the width of the last frame in the active document to exactly 72 points (1 inch).

If ActiveDocument.Frames.Count >= 1 Then
    With ActiveDocument.Frames(ActiveDocument.Frames.Count)
        .WidthRule = wdFrameExact
        .Width = 72
    End With
End If