5 Replies Latest reply on Jul 31, 2008 11:37 AM by (WellerUK)

    CS3 JS How to access styles?

      I'm having problems accessing styles (paragraph, object, table &c.) directly by name.
      (following examples might not be quite right. I can't test them on my home computer)
      My first attempt was

      this only works for styles not organised in CS3's groups

      I can access anything by myDoc.whateverStyles.whateverSylesGrops[x]...whateverStyles.item("name")
      BUT anyone who rearanges the styles in their palette will break the script's functionality

      3. there is an allStyles() or everyStyle() (I don't remember it precisely) method. But that would return an Array. And arrays (at least in my experience) answer only to numerical indexes, not to names.

      So having used up all options I know of I gave up.
      Is there anything I missed?

      Thanks for help