ShapeRange.Distribute Method
Word Developer Reference |
Evenly distributes the shapes in the specified range of shapes. .
Syntax
expression.Distribute(Distribute, RelativeTo)
expression Required. A variable that represents a ShapeRange object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Distribute | Required | MsoDistributeCmd | Specifies whether to distribute shapes horizontally or vertically. |
RelativeTo | Required | Long | True to distribute the shapes evenly over the entire horizontal or vertical space on the page. False to distribute them within the horizontal or vertical space that the range of shapes originally occupies. |
Remarks
You can specify whether you want to distribute the shapes horizontally or vertically and whether you want to distribute them over the entire page or just over the space they originally occupy.
Example
This example defines a shape range that contains all the AutoShapes on the active document and then horizontally distributes the shapes in this range.
Visual Basic for Applications |
---|
|
See Also