Places the shape into the specified position in the shape collection of the group/page. The repositioned shape is specified by its index in the shape collection of the page/group. The position is specified by the new index the shape will get after repositioning.
Applies to: Page object, Shape object
[[Let] booleanRet =] object.ReorderShape ( indexFrom, indexTo ) |
The ReorderShape method syntax has these parts:
Part | Description |
object | Required. An expression that returns an object in the Applies to list. |
indexFrom | Required. An expression that returns a Long value. The index of the shape to be repositioned in the shape collection of the group/page. |
indexTo | Required. An expression that returns a Long value. The index of the position into which the shape will be placed. |
booleanRet | Optional. A Boolean type variable. |
If either the indexFrom or indexTo are less than 1 or greater than the number of shapes in the group/page, the ReorderShape method doesn't reposition the shape and returns False. If the shape has been repositioned successfully, the method returns True. Use the ShapesNum method to find out the number of shapes in the group/page.
Note, that if indexFrom is greater than indexTo, then when a shape with the indexFrom index is repositioned, the indices of all shapes starting from indexTo and to (indexFrom - 1) will be increased by 1. If indexTo is greater than indexFrom, then when a shape with the indexFrom index is repositioned, the indices of all shapes starting from (indexFrom + 1) and to indexTo will be decreased by 1.
See Also |
RemoveAllShapes method, RemoveShape method, RemoveShapeByID method, ReorderShapeByID method, Shape method, ShapeByID method, ShapesNum method |