Viewer.SubShapeAtPoint property (Visio Viewer)

Gets the ID of the subshape in the drawing that is open in Microsoft Visio Viewer, at the specified point in the Visio Viewer window, in the coordinate system of the window, measured in pixels. Read-only.

Syntax

expression.SubShapeAtPoint (X, Y)

expression An expression that returns a Viewer object.

Parameters

Name Required/Optional Data type Description
X Required Long The x-coordinate, in pixels, of the point.
Y Required Long The y-coordinate, in pixels, of the point.

Return value

Long

Remarks

A subshape is a shape that is a member of a group shape.

The origin of the coordinate system of the Visio Viewer window is the upper-left corner. The positive x-direction is to the right, and the positive y-direction is down.

If there is no subshape at the specified point, the SubShapeAtPoint property returns 0.

Example

The following code gets the ID of the subshape at point (200, 200) in the drawing that is open in Visio Viewer.

Debug.Print vsoViewer.SubShapeAtPoint (200, 200)

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.