My script is feeding a long string made from a list of articles in InDesign. I am outputting a Microsoft Word document. I want to delineate the “title” paragraphs of the string from the rest. I made this handler:
on textblue()
with timeout of 60000 seconds
tell application "Microsoft Word"
set myPars to every paragraph of active document
set myTitle to text object of paragraph 1 of active document --first paragraph
set color index of font object of myTitle to blue --first paragraph is blue
repeat with aPar in myPars --rest of the paragraphs
if content of text object of aPar starts with "Story: " then --signifies the first paragraph of an article
set myRange to text object of aPar
set color index of font object of myRange to blue
end if
end repeat
end tell
end timeout
end textblue
Problem is this takes a really long time. Is there a way of speeding this up?