There are few shape objects in a PowerPoint slide. The rectangle, ellipse, parallelogram, triangle and pentagon were drawn in that order meaning rectangle is at the back of all objects.
When iterating through the objects in PowerPoint, is it possible to get a list of all objects that lie in front/behind of an object and fall partially or fully within it. There may be a lot of objects in the PowerPoint and comparing each object against each object is a not a favorable solution.
I would like to get the list of objects(in this case - ellipse, parallelogram and triangle) against the rectangle. How can I achieve that programmatically using VSTO?

The PowerPoint object model provides the Shape.AutoShapeType property which returns or sets the shape type for the specified Shape object, which must represent an
AutoShapeother than a line, freeform drawing, or connector. So, you may use something like that: