How i can move a group of copied items to top of the layer?
When i copied the signs are the first sign on the last position.This is not good when i later would like to numbering the signsI guess i made someting wrong in copy function? if i knew what i was doing wrong, i wouldn't have to push it back up again at the end
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
corelApp.ActiveDocument.Unit = corelApp.ActiveDocument.Rulers.HUnits; corelApp.ActiveSelection.Shapes.All().CreateSelection(); corelApp.ActiveSelection.Shapes.All().Group(); xSize = corelApp.ActiveSelection.SizeWidth; ySize = corelApp.ActiveSelection.SizeHeight; for (int x = 0; x < copyCountX; x++) { for (int y = 0; y < copyCountY; y++) { if ((x + y) != 0) { corelApp.ActiveSelection.Duplicate(x * (xSize + copyOffsetX), 0 - (y * (ySize + copyOffsetY))); } } }
Remo,
Set your Duplicate to a Shape, then Move it to the front. So the VBA version would look like this:
Sub ToTheTop() Dim s As Shape Set s = ActiveSelection.Duplicate s.OrderToFront End Sub
Happy coding,
-Shelby
Many thanks Shelby !-Remo