Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
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”;
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.