I need help writing a JavaScript that will search for the first instance of a paragraph style in each text box and then replace it with another paragraph style. If there's a way to do that with a grep, that'd be good too. Any ideas?
Thanks!
I need help writing a JavaScript that will search for the first instance of a paragraph style in each text box and then replace it with another paragraph style. If there's a way to do that with a grep, that'd be good too. Any ideas?
Thanks!
Some work points you should face developing this
1st all the script inherits the Application class.
get the page you are working on - class Page
Get all the pageItems - ItemPage or PageItem (I don't remember now)
Loop through pageItems and get all the textframes within the document - TextFrame Class
Using a loop get from all the textframes the first paragraph. something like
pageItem[i].textFrame[i].paragraph[0]
A good reading reference for you