Hi All,
Simple request. Writing a script to generate a report that, in InDesign, that can subsequently be emailed. Having trouble getting ID to format text in a text frame with a Paragraph style. Here is a revised portion of the script. InDesign creates the new page - Overrides the text frame from the master page (named “txtboxA”) - inserts the text variable from the start of the script - BUT fails to apply the standing paragraph style (named “Title Heading”)
set anytxt to "Here is some text" as string
tell application "InDesign CS"
activate
tell document 1
make new page
set newpage to the last page
-- Override text field at the top of page
override text frame "txtboxA" of master spread 1 destination page newpage
set contents of text frame "txtboxA" of newpage to anytxt as string
set paragraph style of text frame "txtboxA" to "Title Heading"
-- Returns : InDesign CS got an error : Can't set paragraph style of text frame "txtboxA" of document 1 to "Title Heading".
end tell
end tell