I poked around here and got close to a solution to my issue, but thought I would post here and see if anyone can get me the last step I need. I want to be able to apply character style sheets to a word in a text box in InDesign. Here is the script I found on here and modified. The “set mySelection” line in the script works, the one I have commented out is what I am trying to do and can’t get to work.
set thisText to "Cat and Dog Waffle and Banana"
tell application "Adobe InDesign CS2"
activate
tell document 1
tell page 1
tell text frame "forecast1"
set contents to thisText
set parent story's applied paragraph style to "wx_body center"
--set mySelection to (object reference of every word whose (characters is "Dog"))
set mySelection to (object reference of every word whose (1st character is "D") and (last character is "g"))
set applied character style of mySelection to "wx_body center bold"
end tell
end tell
end tell
end tell
Any ideas?
Thanks…
jim