WrapFormat.DistanceAuto property (Publisher)

Returns or sets an MsoTriState constant indicating whether an appropriate distance between an inline shape and any surrounding text is automatically calculated. Read/write.

Syntax

expression.DistanceAuto

expression A variable that represents a WrapFormat object.

Return value

MsoTriState

Remarks

The DistanceAuto property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

Constant Description
msoFalse The shape's edges are not adjusted depending on the margins of the text box it overlaps.
msoTriStateMixed A return value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggle Set value that switches the property value between msoTrue and msoFalse.
msoTrue The default. The shape's edges are automatically adjusted depending on the margins of the text box it overlaps.

Example

The following example sets shape one on page one of the active publication so that its edges are not automatically adjusted based on its distance from surrounding text.

Sub SetDistanceAutoProperty() 
 With ActiveDocument.Pages(1).Shapes(1).TextWrap 
 .Type = pbWrapTypeSquare 
 .DistanceAuto = msoFalse 
 End With 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.