The code you posted should work as intended.
What do you see?
1 person found this helpful
if (app.selection.parentStory.constructor.name!="Story")and says undefined is not an object
Edit: solution, I had to choose Adobe InDesign CS5 from the ESTK menu instead of ESTK CS5
Did you select some text?
It work, thanks
This merely sorts lines of paragraphs in alphabetical order.
It doesn’t split the lines by paragraph into separate text frames.
Thanks. Still a cool script for sorting.