Hi all,I thought I was doing this correctly, but it always seems to crash Corel. It seemed to be straight forward, but it's not working.Starting with having a range of blends of objects on a path, I simple want to:1)Loop through each blend.2)Separate the blend.3)Ungroup the objects4)Delete the Blend path.This is what I was trying: 'Loop through each blended object, separate the blends from the path, ungroup, and delete path. For Each sSingleBlend In srBlendedObjects sSingleBlend.Separate sSingleBlend.UngroupAll sSingleBlend.Effect.Blend.Path.Delete
Next sSingleBlendI think it's crashing when it hit sSingleBlend.UngroupAllAny suggestions?Thanks....JT
I'm afraid you lost me... Do you want to check the code or to obtain something? If yes, can you better explain which would be the final result according to your need?
How did you declare srBlendedObjects variable. What type it is?
If I understand you correctly you could do something like this:
Sub DeleteBlendPaths() Dim sBlend As Shape Dim srBlends As ShapeRange Dim srBlendPaths As New ShapeRange Set srBlends = ActiveSelectionRange.Shapes.FindShapes(Query:="@Type = 'blend'") For Each sBlend In srBlends If Not sBlend.Effect.Blend.Path Is Nothing Then srBlendPaths.Add sBlend.Effect.Blend.Path End If Next sBlend For Each sBlend In srBlends sBlend.Separate Next sBlend srBlends.UngroupAll srBlendPaths.Delete ActiveDocument.ClearSelection End Sub
Happy coding,
-Shelby
Thanks! That's exactly what I'm trying to do.I was trying to Ungroup each blend inside the For Loop and that's what keep breaking.
A Blend does not have to have a path. So if I do not have the check I could run into an error. -Shelby