works in v19 but not in v20, why?

Sub FindColorCQLC()
     Dim sr As ShapeRange

     Set sr = ActivePage.Shapes.FindShapes(Query:="@outline.color='magenta'")
           sr.SetOutlineProperties Color:=CreateRGBColor(0, 100, 0)
End Sub

Anyone know why thee above VBA code will not work in CorelDRAW2018? I've tested 32bit and 64bit on two different PCs with the same negative results

Works fine in CorelDRAW2017 and X8.

How about code that *will* work in 2018?

Parents
No Data
Reply
  • I see the same thing. As a test, you can use Evaluate to test the CQL, for example:

    MsgBox ActiveShape.Evaluate("@fill.color.name")

    In 2018, that's returning color names for spot colors. For process colors, it is returning "unnamed color".

    I don't know why this is the case, but I'd love to know more.

    As another way of doing it, you could try using this for your query:

    Query:="@outline.color=rgb(255,0,255)"

    That works for me in 2018.

Children