I have multiplied a group of shapes in the position of another group of shapes (references).
Finally I want all my groups grouped toghether, but avoiding the select all option (becouse there are some other elements in page)
I have tryed this, but the group line do not work:
Dim gr As New ShapeRange
Dim xx As Double, yy As Double
For Each sh In sr sh.GetPosition xx, yy With lab.DuplicateAsRange(w)lab.SetPosition xx, yy gr.Add lab '<----------------------------------------------- this line does nothing !!!! and I dont know why End With Next
gr.Group '<----------------------------------------------- this line does nothing !!!! and I dont know why
sr.Delete
Do you want to group all groups on a page into one common group?
Not all groups.
I want to group only the objects (groups) generated by multiplication of "lab" shape
With lab.DuplicateAsRange(w)lab.SetPosition xx, yy
The lab shape is duplicating into a set of positions readed from "sh" and I want all the lab groups to be grouped togheter
try this:
Dim lab As Shape, srLabGroups As New ShapeRangeDim sr As ShapeRange, s As Shape, x#, y#
Set lab = ... ' "lab" shape
Set sr = ... ' rest shapes
For Each s In sr s.GetPosition x, y srLabGroups.Add lab.Duplicate srLabGroups.LastShape.SetPosition x, yNext
srLabGroups.Group
GREAT !!!! GREAT !!!! GREAT !!!! GREAT !!!! GREAT !!!!
YOU'RE THE MAN SHARK !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!