1 Attachment(s)
Grouping of shapes in PowerPoint VBA
Hello,
I am trying to group multiple shapes in a slide without using selection. Following is snippet I am working on but the problem is, each time I have to select shapes that are to be grouped and then run macro which is similar to manually grouping by using builtin feature.
My idea is to 1. select all ( ctr+ A) and run macro or
2. To detect shapes that needs to be grouped and collect them into range or array and then utilize grouping method.
To detect shapes - A condition that checks for overlapping or touching of shapes and consider them as shapes that are to be grouped.
I am not sure how can this be done. Any thoughts on this is really helpful. : pray2:
code:
Sub Grouping() ActiveWindow.Selection.ShapeRange.Group
' A code which can avoid task of selecting shapes
End Sub