Is there a way to convert the outline of a shape to an object using a macro/button?

If I assign this code to run via button press in a form, it will crash coreldraw.  I still don't understand why that happens and if there is a way to run this code with a button.

    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    Dim s1 As Shape
    Set s1 = OrigSelection(1).Outline.ConvertToObject

Parents Reply Children