Thanks, Linda, that's a clever use of the Table of Contents feature.
For those of you unfamiliar with the feature, here's are more precise steps. It will only work (I think) with single lines of text.
(1) Each included line much have the a unique paragraph style applied to it so it can be pulled out by the feature.
(2) Choose Layout > Table of Contents
(3) Delete word "Contents" in the Title field so it doesn't appear in the list
(4) Select the unique paragraph style in the Other Styles list on the right, and click Add to move it into the Include Paragraph Styles on the left
(5) In the Style section below the two lists, choose No Page Number in the Page Number menu.
(6) Check Sort Entries in Alphabetical Order
(7) Click OK
( 8 ) Use the text cursor to create a new text frame. It will contain the sorted list, formatted with the unique paragraph style.