0 Replies Latest reply on Jun 25, 2009 3:15 AM by RockScript

    To remove duplicate from paragraph style

    RockScript Level 1

      for(var j=0;j<myDoc.paragraphStyles.length;j++)
              {
                  app.findPreferences = app.changePreferences = null
                  app.findPreferences.appliedParagraphStyle=myDoc.paragraphStyles.item(myDoc.paragraphStyle s[j].name);
                  var srch=myDoc.search()
                  if(srch.length==0)
                  {
                      unUsedStyle.push(myDoc.paragraphStyles[j].name)
                  }
                  else
                  {
                     usedStyle.push(myDoc.paragraphStyles[j].name)
                  }

       

       

      This is mycode Here i used two array one for to find the unused paragraph style from the document.

       

      another one for find used paragraph style from the document. if used and unused style come same document. i want to remove the

       

      duplicate how to remove.