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
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#, 60End Sub
Sub ADD_PANTONE_COLOR()'ActiveShape.Fill.ApplyUniformFill CreateSpotColorByName(MsgBox Application.Palettes.CountDim mpal As PaletteFor Each mpal In Application.PalettesMsgBox mpal.Name & " " & "Identifier = " & mpal.IdentifierNextEnd Sub
Thank you for these subs as well. Early on, in my struggles with this segment of my project, I was able to come up with the "Windows Registry-looking" ID for the Pantone palette. It looked something like "6e75244b-d853-4d2e-bea2-a5da3f195d08".
I went with that at the time and it worked alright for a day. But the next time I tried it, the ID number for the palette had changed, so the code no longer worked. Is that something to be expected - that the long ID string of a given palette will change on a regular basis?