How to group some shapes in coerl draw macros?

714 Views Asked by At

i create some shapes in coreldraw macros in a array with for loop :

Dim i, j As Double
    j = 1
    Dim t() As Shape
    For i = 1.575 To s4height - 1.575 Step 1.575
        ReDim t(j)
        Set t(j) = s5.Duplicate
        t(j).Move 0, i
        j = j + 1
    Next i

now i want to group s5 shape and all shapes in t() array I grateful anyone's idea to share !!!

1

There are 1 best solutions below

0
On BEST ANSWER

here is the answer you should create a New ShapeRange then add your shapes into it with and create a shape and group ShapeRange in it example :

Dim OrigSelection As New ShapeRange
OrigSelection.Add s5
Dim gp1 As Shape
Set gp1 = OrigSelection.Group