DrawAlign

Syntax

DrawAlign [.Horizontal = number] [, .Vertical = number] [, .RelativeTo = number]

Remarks

Aligns the selected drawing objects. The arguments for the Align statement correspond to the options in the Align dialog box (Align Drawing Objects button, Drawing toolbar).

Argument

Explanation

.Horizontal

Specifies a horizontal alignment:

0 (zero) None; existing horizontal positions are preserved

1 Left

2 Center

3 Right

.Vertical

Specifies a vertical alignment:

0 (zero) None; existing vertical positions are preserved

1 Top

2 Center

3 Bottom

.RelativeTo

Specifies what the objects are aligned with:

0 (zero) Each other

1 Page


Example

This example left-aligns all drawing objects within the current paragraph. Using the predefined bookmark "\Para," DrawSetRange sets the drawing object range to the paragraph containing the insertion point. For more information about predefined bookmarks, see "Operators and Predefined Bookmarks" later in this part.


DrawSetRange "\Para"
For count = 1 To DrawCount()
    DrawExtendSelect count
Next count
DrawAlign .Horizontal = 1, .Vertical = 0, .RelativeTo = 0

See Also

DrawCount(), DrawExtendSelect, DrawSelect, DrawSetRange, FormatDrawingObject