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";
Parargaph Style #0 is [No Style], and you cannot change it this way. Simply start your loop at 1.
Style #1 is [Basic Style], and if you have trouble changing that as well, just start at 2.
Thanks a lot!
The problem is solved