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

ContainerProperties.GetMemberShapes Method (Visio)

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

Returns the shape identifiers (IDs) of all members of the container, as specified.


expression . GetMemberShapes( ContainerFlags )

expression A variable that represents a ContainerProperties object.


NameRequired/OptionalData TypeDescription
ContainerFlagsRequiredLongSpecifies which container member shape IDs to return.

Return Value



The ContainerFlags parameter can be one or more of the following VisContainerFlags constants.

visContainerFlagsDefault0Returns all shape types and includes items in nested containers.
visContainerFlagsExcludeContainers1Excludes member shapes that are containers.
visContainerFlagsExcludeConnectors2Excludes member shapes that are connectors.
visContainerFlagsExcludeCallouts4Excludes member shapes that are callouts.
visContainerFlagsExcludeElements8Excludes member shapes that are not containers, lists, connectors, or callouts.
visContainerFlagsExcludeNested16Excludes any member shapes that are members of containers or lists nested within the container.
visContainerFlagsExcludeListMembers32Excludes members of a list container that are explicitly members of any list. Does not exclude other shapes in the list container.

GetMemberShapes returns an empty array if there are no member shapes.


The following Visual Basic for Applications (VBA) example shows how to use the GetMemberShapes method to get the IDs of all member shapes in a specified container on the active page, loop through those shapes, and print the ID of each shape in the Immediate window.

For Each memberID In vsoContainerShape.ContainerProperties.GetMemberShapes(visContainerFlagsDefault) 
    Set vsoShape = ActivePage.Shapes.ItemFromID(memberID) 
    Debug.Print vsoShape.ID
© 2018 Microsoft