How to apply the two different styles using find and replace


hello all,

 

in manuscript have lot of bullet list paragraphs. in indesign have 3 styles (bullet first, bullet middle, , bullet last).i can applied bullet middle (bl) style bullet list paragraphs. need apply bullet first (bl1) , bullet last (bl2) style. have used below script, not applied specfic styles.

 

app.findtextpreferences.appliedparagraphstyle=app.activedocument.paragraphstyles.item("bl"); var myresults = app.activedocument.findtext();      (i = 0; <= myresults.length - 1; i++)       {            myresults.select;            var mysel = app.selection[0];           var myparagraphs = mysel.paragraphs.length;           //alert(myparagraphs);           mysel.paragraphs[0].appliedparagraphstyle = "bl1";           mysel.paragraphs[myparagraphs-1].appliedparagraphstyle = "bl2";      } 

 

kindly me on this.......

as said in forum, there's no need select anything:

 

for (i = 0; < myresults.length; i++)

    {

    myresults[i].paragraphs[0].appliedparagraphstyle = "bl1";

    myresults[i].paragraphs[-1].appliedparagraphstyle = "bl2";

    }

 

peter



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support