WrapFormat Property

Applies To

Shape object, ShapeRange collection object.

Description

Returns a WrapFormat object that contains the properties for wrapping text around the specified shape or shape range. Read-only.

See Also

DistanceBottom property, DistanceLeft property, DistanceRight property, DistanceTop property, Side property, Type property, WrapFormat object.

Example

This example adds an oval to the active document and specifies that the document text wrap around the left and right sides of the square that circumscribes the oval. The example sets a 0.1-inch margin between the document text and the top, bottom, left side, and right side of the square.

Set myOval = ActiveDocument.Shapes.AddShape(msoShapeOval, 36, 36, 90, 50)
With myOval.WrapFormat
    .Type = wdWrapSquare
    .Side = wdWrapBoth
    .DistanceTop = InchesToPoints(0.1)
    .DistanceBottom = InchesToPoints(0.1)
    .DistanceLeft = InchesToPoints(0.1)
    .DistanceRight = InchesToPoints(0.1)
End With