2 Replies Latest reply on Oct 25, 2013 6:40 AM by Jump_Over

    Handy script: Show all nested styles

    SLTyPete Level 1

      Not seeing this in the user interface, I coded the following up. Maybe handy for someone else too...

       

       

      #target indesign
       ShowAllNestedStyles();
        
      function ShowAllNestedStyles() {
          var myNestedList = new Array(0);
          var myDoc = app.documents.item(0);
          
          for (j = myDoc.paragraphStyles.length-1;j>=0;j--) {
              var myPStyle = myDoc.paragraphStyles[j];
              var myPSname = myPStyle.name;
               for (i = myPStyle.nestedStyles.length-1;i>=0; i--) {
                    var NstyleName = myPStyle.nestedStyles[i].appliedCharacterStyle.name;
                    myNestedList.push(myPSname+" -- '" + NstyleName + "'\r");
               }
           }
          alert("NESTED Pstyles:  PStyle -- 'nest'\r" + myNestedList.join(""));
        
      }