Group Objects with Macro

I want to group all objects in a page. I used this code:

Sub Group()

Set sr = ActivePage.Shapes.All
sr.group

End sub

The problem I have is that it group guides along with the object. I don't want the guides the be grouped with it

Parents
No Data
Reply
  • You can do a lot with FindShapes and CQL.

    Exclude guideline shapes:

    ActivePage.Shapes.FindShapes(, , False, "@type != 'guideline'")

    Exclude shapes on special layers and shapes on master layers:

    ActivePage.Shapes.FindShapes(, , False, "@com.Layer.IsSpecialLayer = 'False' and @com.Layer.Master = 'False'")

Children
No Data