How to ungroup all in all pages including inside powerclip?
Assuming that you want to keep the ungrouped shapes inside the powerclip you could do something like this:
Sub UngroupItAll() Dim p As Page Dim sr As ShapeRange, srPowerclipShapes As ShapeRange Dim s As Shape For Each p In ActiveDocument.Pages p.Shapes.All.UngroupAll Set sr = p.Shapes.FindShapes(Query:="!@com.powerclip.IsNull") For Each s In sr.Shapes Set srPowerclipShapes = s.PowerClip.ExtractShapes.UngroupAllEx srPowerclipShapes.AddToPowerClip s Next s Next p End Sub
Happy Coding!
-Shelby
A little update
Sub UngroupItAll() Dim p As Page Dim sr As ShapeRange, srPowerclipShapes As ShapeRange Dim s As Shape
For Each p In ActiveDocument.Pages p.Shapes.All.UngroupAll
Set sr = p.Shapes.FindShapes(Query:="!@com.powerclip.IsNull")
For Each s In sr.Shapes s.PowerClip.Shapes.FindShapes.UngroupAll Next s Next pEnd Sub
Very good, both one and the other, but I did tests here, I joined both in a macro only but none of them find the Power Clips on page 01, from 01 it does everything ok.
What would be more or missing in the code to do this on all pages of the document? Test on CDR 2021, grateful in advance!
It should be working for every page. If you are not seeing this posting a sample document would help troubleshoot.
I now noticed in the recording that it worked fine with the multi-page view, but in the single-page view, just one at a time, it didn't. It extracts on the last page only, on the first page that also has a PowerClip this does not happen on single view pages! Strange not,
CorelDRAW2021 W10!I have merged the days into one and was thinking of making it available to more people if I can! I'm grateful for the feedback and follow a video to help you see!
https://mega.nz/file/ZlkQlQgZ#YenCvX_stgC92jaZRw8KUJ9lTX8viiy5dgOsmMrmuEQ