Skip to main content
Inspiring
January 16, 2023
Answered

cs4 set color of text frame does not work

I need to set registration color to selection and the following doesn't work

 

 

var colour = app.activeDocument.swatches['[registration]'].color;
selection[0].contents.fillColor = colour;

 

 

using `selection[0].fillColor` doesn't work also

This topic is closed to new replies. Start a new post to keep the conversation going.
femkeblanco
femkeblancoCorrect answer
Legend
January 16, 2023

Try

selection[0].textRange.fillColor = color;

 

4 replies

femkeblanco
Legend
January 16, 2023

Is the selection a text frame?

Translate
Inspiring
January 16, 2023

yes, it's a text frame

Translate
femkeblanco
femkeblancoCorrect answer
Legend
January 16, 2023

Try

selection[0].textRange.fillColor = color;

 

Translate