3 Replies Latest reply on Aug 25, 2014 1:43 AM by VeluVK

    Apply superscript position into character style

    VeluVK

      Hi,

       

      I am new in scripting, i have tried the below code for finding superscript characters and apply the character styles?  the below code not showing any errors. Can you anyone please suggest the below code is correct or not?

       

       

      var myDoc = app.activeDocument;

      app.findTextPreferences.findWhat = NothingEnum.nothing;

      app.changeTextPreferences.changeTo = NothingEnum.nothing;

      app.findTextPreferences.position = Position.SUPERSCRIPT;

      app.changeTextPreferences.appliedCharacterStyle = "superscript";

      app.documents.item(0).changeText();

      app.findTextPreferences.position = Position.SUBSCRIPT;

      app.changeTextPreferences.appliedCharacterStyle = "subscript";

      app.documents.item(0).changeText();

       

       

      Regards,

      Velu