looping through paragraph styles
Hello,
I'm trying to loop through the paragraph styles in my selection with this script:
var styles = app.selection[0].textStyleRanges.everyItem().appliedParagraphStyle;
for (var i=0;i<styles;i++) {
styles.name;
}
It just returns undefined.
I'd also like to be able to loop through all the applied paragraph styles in a document (to find out the names).
Any suggestions would be great!
Thanks