I can select all objects in current layer with the following
but, how do I loop through all layers and add their shapes to Selection?
Use ActivePage.Layers and just ignore layers that are the Master one. I can show you in C# but I am guessing you want it in VBA
Dim shRGuide As ShapeRange, shRMaster As ShapeRange
Set shRGuide = ActivePage.Layers("Guides").Shapes.All
Set shRMaster = ActivePage.Layers("Desktop").Shapes.All
Depending on the content you are trying to access, you might use ActivePage.Shapes.FindShapes().
FindShapes can be recursive (dig into groups) or non-recursive, and you can use a CQL query to exclude specific content (e.g., guidelines, shapes on specific layers, shapes on locked layers, etc.).
So something such as this:
Dim sr As ShapeRange
Set sr = ActivePage.Shapes.FindShapes(, , False, "@type != 'guide' and @com.layer.isguideslayer = 'False' and @com.layer.isdesktoplayer = 'False'")
or you can just press Ctrl-A (:
That works; thanks kindly!