If there is an independent Outline with no "Fill" color assigned. The code below crashes CorelDraw.
It works as long as a "Fill" color is assigned.
Seems as if it needs the Fill to consider it a shape?
What am I missing?
Dim s As Shape Dim sr As ShapeRange Set sr = ActiveSelectionRange For Each s In sr.Shapes s.Outline.ConvertToObject Next s
SkippurV said:The code below crashes CorelDraw.
Which version of CorelDRAW are you using?
You needse check if Outline.type is diferent of nooutline
It's caused crashes since I've used Corel (x5) I recall hitting the same issue when I started writing macros. Still does in 2020 too.
As bonus says just put an if statement in there to stop it trying to convert a none existent outline
For Each s In sr.Shapes if not s.Outline.Type=cdrNoOutline then s.Outline.ConvertToObjectNext s