1 person found this helpful
resolve the returned value from itemByRange() to an array of page objects by using getElements().
Example that is working with a selected frame on a document page:
var doc = app.documents; var pages = doc.pages; var start = app.selection.parentPage; // doc.pages is a collection so we could use this to access the last one in the document: var end = pages[-1]; // range could also be a collection: var range = doc.pages.itemByRange( start , end ); // Resolve the collection of pages to an array of pages: var arrayOfRange = range.getElements(); // Then loop the array…
Thanks. I will read in on getElements() and the link you sent. I only searched for the itemByRange() and couldn't really find anything that helped me there. But your solution works perfectly.