Illustrator CS3-apply swatch from color palette to an object

what I’d like to do is apply an existing swatch from the color palette to an object. For example, I have small rectangle that I’d like to change from “White” to “Pantone 202 C.” How can I do this? Is it possible? So far all I’ve been able to think of is this, and it doesn’t work:

set fill color of selection to “Pantone 202 C”

can somebody point me in the right direction?

You might want to do something like this.

tell application "Adobe Illustrator"
	tell document 1
		if exists spot "PANTONE 202 C" then
			set fill color of selection to {class:spot color info, tint:100.0, spot:spot "PANTONE 202 C"}
			display dialog "This document does NOT contain this spot?" giving up after 3
		end if
	end tell
end tell

YES! :smiley:

That’s exactly what I needed. Thank you so much. :slight_smile: