How to fill a shape with a Pantone color using VBA

OK, I'm trying to do a very simple thing but the way to do it is eluding me. I just want to fill a shape with a Pantone color using a macro. Just one color from the basic Pantone coated palette (not Pantone+ or anything). I can't figure out the way to correctly identify the palette and color in a way that CorelDraw will recognize. Any help will be greatly appreciated.

Ric

Parents
  • Hello,

    First macro is recorded. Second macro iterate all active color palettes to see names and identifiers.
    Greetings!

    Sub PANTONE_COLOR()
    ' Recorded 16.3.2023 ã.
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    OrigSelection.ApplyUniformFill CreateSpotColor("a4e9990e-f1cc-4fae-9d93-53dcedb4261a", 2, 100)
    ActiveSelection.Fill.PSScreen.SetProperties "Default", 45#, 60
    End Sub


    Sub ADD_PANTONE_COLOR()
    'ActiveShape.Fill.ApplyUniformFill CreateSpotColorByName(
    MsgBox Application.Palettes.Count
    Dim mpal As Palette
    For Each mpal In Application.Palettes
    MsgBox mpal.Name & " " & "Identifier = " & mpal.Identifier
    Next
    End Sub

Reply Children
No Data