Longtime Quark XPress scripter, trying to script in Indesign CS2, trying to call a paragraph style sheet.
Here is my script:
set firstName to "John"
set lastName to "Doe"
set returnVar to ASCII character 13
set fullName to {firstName, returnVar, lastName} as text
set theTextFrame to "txt12"
tell application "Adobe InDesign CS2"
activate
tell document 1
tell text frame theTextFrame
set contents to fullName
end tell
set applied paragraph style of paragraphs of text frame theTextFrame to paragraph style "agent"
end tell
end tell
When I run it, it only applies the style sheet to the first paragraph. When the text first appears in the box, only the first paragraph fits, the second paragraph is overset. The script will not apply the style sheet to the overset text. If I make the box bigger, the script runs fine, applying the style sheet to all paragraphs. I have to be able to act on the overset text to get it to fit.
Any ideas?
Thanks…
jim