1 Reply Latest reply on Jan 26, 2012 5:12 PM by jesse reko

    Removing paragraph styles by list of what I don't want to delete

    jesse reko Level 1

      Hello, I've recently found this bit of code that finds character styles by name, replaces them and deletes the old style


      var myDocument = app.activeDocument;

      if (myDocument.characterStyles.item("Title") != null) {

      if (myDocument.characterStyleGroups.item("Catalog Styles"). characterStyles.item("title") != null) {

      myDocument.characterStyles.item("Title").remove(myDocument.characterStyleGroups.item("Cata log Styles"). characterStyles.item("title"));

       


      I was wondering if anyone could think of a way to define a list of the styles you wouldn't want deleted and delete everything else?