getting the names of paragraph styles in selection
Seems like this ought to work:
app.selection[0].paragraphs.everyItem().appliedParagraphStyle.name;
or
app.selection[0].textStyleRanges.everyItem().appliedParagraphStyle.name;
(assuming, of course, that some text is selected, which I've already checked).
But both snippets return "undefined." If I don't specify the name, I get an array of paragraph styles and so can loop through to extract the names. But I just wanted to check here first to see if I'm missing something obvious.