ContainingShape property

Microsoft Visio Developer Reference

ContainingShape property

   Example   

Returns the Shape object that contains an object or collection.

Version added

4.0

Syntax

objRet = object.ContainingShape

objRet

The Shape object that contains the object or collection.

object

Required. An expression that returns a Selection or Shape object or a Shapes collection to examine.

Remarks

If the Shape object is the member of a group, the ContainingShape property returns that group.

If the Shape object is a top-level shape in its Page or Master object (it is not a member of a group), the ContainingShape property returns the page sheet of its page or master.

If the Shape object is the page sheet of a page or master, the ContainingShape property returns Nothing.