How do I move objects from all layers into selection?

I can select all objects in current layer with the following

                 ActiveLayer.Shapes.All.AddToSelection

but,  how do I loop through all layers and add their shapes to Selection?

Parents
No Data
Reply
  •       

    1
    2
    3
    4
    5
    6
    7
    8
    Sub testSelectAll()
     Dim shRGuide As ShapeRange, shRMaster As ShapeRange
      ActivePage.Shapes.All.CreateSelection
      Set shRGuide = ActivePage.Layers("Guides").Shapes.All
      Set shRMaster = ActivePage.Layers("Desktop").Shapes.All
      shRGuide.RemoveFromSelection: shRMaster.RemoveFromSelection
         Debug.Print ActiveSelectionRange.Shapes.Count
    End Sub
    
Children