Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Robert Kern
    Member

    Hi Theunis,

    I tried your script but it kicked out the following error:

    Error Number 8:
    Error String: Syntax error

    Line 5:
    Source: app.findTestPreferences.appliedParagraphStyl,e = “H2″;
    Offending Text: ”

    I’m a newbie to scripting, users not a writer, but it seemed simple enough to modify our script to the tags we use (H1, H2, H3, and Body1).
    Any thoughts on how to adjust the script, below, to fix the problem is greatly appreciated!

    app.findTextPreferences = null;
    app.findTextPreferences.appliedParagraphStyle = “H2”;
    var myResults = app.activeDocument.findText();
    for (i=0; i<myResults.length; i++)
    myResults[i].parentStory.paragraphs.nextItem(myResults[i].paragraphs[0]).appliedParagraphStyle = “Body1”;

Viewing 1 post (of 1 total)