1 Reply Latest reply on Aug 15, 2010 7:55 PM by Steven..

    I need to preserve the local formatting while delete and replace styles using JS

    Green4ever Level 3



      While delete and replacing the style using JS.. The local formatting is not carried with that. I mean it is like clearing over rides after over rides...


      But i need those local formatting to be preserved. (italic, super script, subscript, bold, etc... ) Is it possible in Java script... can anyone help on this regard..



      //clear the find and change preferences before running this lines....

      function replaceStyle(pstyle, newStyle){
          with (app.findGrepPreferences)
                  appliedParagraphStyle = pstyle;
          with (app.changeGrepPreferences)
                  appliedParagraphStyle = newStyle;


      replaceStyle("ct", "tt");


      Thanks in advance...