Edit

Share via


Viewer.ParentShape property (Visio Viewer)

Gets the index number of the parent shape of the specified shape in the drawing that is open in Microsoft Visio Viewer. Read-only.

Syntax

expression.ParentShape (ShapeIndex)

expression An expression that returns a Viewer object.

Parameters

Name Required/Optional Data type Description
ShapeIndex Required Long The index of the shape whose parent you want to find.

Return value

Long

Remarks

The expression parent shape refers to the group shape of which the specified shape is a part.

The collection of shapes is one-based, so the index of the first shape in the collection is 1.

Example

The following code shows how to get the parent of the first shape on the current page in the drawing that is open in Visio Viewer.

Debug.Print vsoViewer.ParentShape(1)

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.