2 Replies Latest reply: Apr 18, 2012 12:03 AM by Bhatt, Manish RSS

    Please help me!!

    Bhatt, Manish

      Hi All,

       

      Please help me!!

       

      Indesign Paragraph styles & Charater Style starting three character deleted.

       

      For Example US_text_heading

       

      text_heading it a correct

       

      please send me Javascript

        • 1. Re: Please help me!!
          Kasyan Servetsky Community Member
          Main();
          
          function Main() {
              var i, j, parStyle, charStyle,
              doc = app.activeDocument,
              parStyles = doc.allParagraphStyles,
              charStyles = doc.allCharacterStyles;
              
              for (i = 2; i < parStyles.length; i++) {
                  parStyle = parStyles[i];
                  try {
                      if (parStyle.name.substr(3) != "") parStyle.name =  parStyle.name.substr(3);
                  }
                  catch(err) {
                      $.writeln(err.message + ", line: " + err.line);
                  }
              }
          
              for (j = 1; j < charStyles.length; j++) {
                  charStyle = charStyles[j];
                  try {
                      if (charStyle.name.substr(3) != "") charStyle.name =  charStyle.name.substr(3);
                  }
                  catch(err) {
                      $.writeln(err.message + ", line: " + err.line);
                  }
              }
          }
          
          • 2. Re: Please help me!!
            Bhatt, Manish Community Member

            Thanks you