2 Replies Latest reply on Jul 9, 2009 3:23 AM by Ola K

    [JS, CS3] a script to change language in all paragraph styles

    Ola K Level 1

      Hi,

       

      I made a script to change the language in all paragraph styles to "French", but when I run it I get the error: "Invalid request on root style". Could you please tell me what am I missing?

       

      myDoc = app.activeDocument;
      myStyles = myDoc.paragraphStyles;
      for (i = 0; i < myStyles.length; i++)
      {
      myStyle = myStyles[i];
      myStyle.appliedLanguage = "French";
      }