Table of contents
TOC
Collapse the table of content
Expand the table of content

ContainerProperties.ReorderListMember Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Moves a shape or a set of shapes up or down in the list.

Syntax

expression . ReorderListMember( ObjectToReorder , Position )

expression A variable that represents a ContainerProperties object.

Parameters

NameRequired/OptionalData TypeDescription
ObjectToReorderRequired[UNKNOWN]The shape or shapes to reorder in the container. Can be either Shape or Selection objects.
PositionRequiredLongThe insertion position in the list, which is one-based.

Return Value

Nothing

Remarks

If the container is not a list, Microsoft Visio returns an Invalid Source error.

If the ObjectToReorder parameter does not contain top-level shapes on the page, if any shape in ObjectToReorder is not a member of the list, or if the list is locked, Visio returns an Invalid Parameter error.

To insert before the first item in the list, pass 1 for the Position parameter.

To insert after the final item in the list, set Position greater than or equal to the count of items.

If you pass an out-of-range value for Position, Visio uses the nearest valid position.

If you pass a non-contiguous selection of list members for ObjectToReorder, Visio makes the selection contiguous in the resulting reordered list, while maintaining relative position. For example, in a list ordered A,B,C,D, if you move B and D to position 1, the resutling list order is B,D,A,C.

Example

The following Visual Basic for Applications (VBA) example shows how to use the ReorderListMember method to move a list member shape to the second position in the list.

vsoListShape.ContainerProperties.ReorderListMember vsoShape, 2
© 2017 Microsoft