Dim s As Shape
ActiveLayer.Shapes.All.CreateSelectionFor Each s In ActiveSelection.Shapes.FindShapesIf s.Type = cdrMeshFillShape ThenSet s1 = s.ConvertToBitmapEx(cdrCMYKColorImage, False, True, 200, cdrNormalAntiAliasing, True, False, 95)End IfNext
This macro search all meshes and make it bitmap, but not in powerclips, so how to do this with powerclip in document?
Dim SR As ShapeRange, SM As ShapeRange, GN As New ShapeRange, s As Shape, g As Shape, b As ShapeActiveDocument.BeginCommandGroupFor Each s In ActivePage.Shapes.FindShapes(Type:=cdrGroupShape)Set SM = s.UngroupExSM.UngroupAllFor Each g In ActiveSelection.Shapes.FindShapes(Query:="!@com.powerclip.IsNull")Set SR = g.PowerClip.ExtractShapesSR.UngroupAllFor Each b In ActiveSelection.ShapesIf Not b.Transparency.Type = cdrNoTransparency ThenSet AM = b.ConvertToBitmapEx(cdrCMYKColorImage, False, True, 200, cdrNormalAntiAliasing, True, False, 95)ElseSet AM = bEnd IfGN.Add AMNextGN.AddToPowerClip g, cdrFalseNextSM.GroupNextActiveDocument.EndCommandGroupEnd Sub
I just don't know what to do next, it work only with one group, next group produce error.
if i use only "Set SM = s.UngroupEx" then it works fine BUT only when group not contain other groups. If i use "Set SM = s.UngroupEx" with "SM.UngroupAll" then script get error after first group. And i cant; make something like "Set SM = s.UngroupAll" cause this make error to :(
i found that "ActivePage.Shapes.FindShapes(Type:=cdrGroupShape)" get all groups, even groups in groups, so when i do ungroupall, all subsequence get broken. How to find only main groups?