Skip navigation
Bhatt, Manish
Currently Being Moderated

Please help me!!

Apr 17, 2012 10:32 PM

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

 
Replies
  • Currently Being Moderated
    Apr 17, 2012 11:59 PM   in reply to Bhatt, Manish
    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);
            }
        }
    }
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points