Skip to main content
jmlevy
Community Expert
Community Expert
December 15, 2011
Answered

Change language script does not work with styles groups

  • December 15, 2011
  • 1 reply
  • 826 views

I receive CS5.5 documents in which paragraph styles are in groups. When I run this script http://forums.adobe.com/message/1913197 , it works only on the paragraph styles that are not in styles groups. Can someone help me?

This topic has been closed for replies.
Correct answer Laubender

That's because there is a difference in scope between "paragraphStyles" and "allParagraphStyles" (lists all paragraph styles (regardless of their group)).

So changing:

myStyles=myDoc.paragraphStyles;

to:

myStyles=myDoc.allParagraphStyles;

should do the trick (not tested with the  script in the linked thread).

Same goes for the character styles section:

//myStyles=myDoc.characterStyles;

myStyles=myDoc.allCharacterStyles;

Uwe

1 reply

LaubenderCommunity ExpertCorrect answer
Community Expert
December 15, 2011

That's because there is a difference in scope between "paragraphStyles" and "allParagraphStyles" (lists all paragraph styles (regardless of their group)).

So changing:

myStyles=myDoc.paragraphStyles;

to:

myStyles=myDoc.allParagraphStyles;

should do the trick (not tested with the  script in the linked thread).

Same goes for the character styles section:

//myStyles=myDoc.characterStyles;

myStyles=myDoc.allCharacterStyles;

Uwe

jmlevy
Community Expert
jmlevyCommunity ExpertAuthor
Community Expert
December 15, 2011

Works perfectly, thank you!