Change character styles in InDesign CS3

Hello,

I create lot of text frames and name them “D1Ext” thru “D37Ext” it is for calendar creation.
Then I create character styles “Weekday”, “Saturday”, “Sunday”,


set myPage to page 1 of document 1
		
tell myPage

set contents of text frame "D1Ext" to  D1Ext as string

apply character style text of  text frame "D1Ext" using "Sunday"

end tell



But when I try to apply character style to text frame I got an error message.

In Illustrator CS3 it is easy apply different character style for each character or all text.

What I am do wrong?

Hi,

try this


tell application "Adobe InDesign CS3"
	set myPage to page 1 of document 1
	tell myPage
		set contents of text frame "D1Ext" to D1Ext as string
		set applied character style of text 1 of text frame "D1Ext" to character style "Sunday"		
	end tell
end tell


Hello,

I got an error when i start this script:

Adobe InDesign CS3 got an error: Invalid value for set property ‘applied character style’. Expected character style or string, but received nothing.

Best regards,

Normunds

sorry, this should do it


tell application "Adobe InDesign CS3"
	set myPage to page 1 of document 1
	tell myPage
		set contents of text frame "D1Ext" to D1Ext as string
		set applied character style of text 1 of text frame "D1Ext" to "Sunday"
	end tell
end tell

Hi Stefan,

It work’s !!!

Yo are life saver. Thank You very much!

Normunds