There are two ways to get a pageItem :
-Document.allPageItems which is an array of extended objects of PageItem ( Rectangle, TextFrame, Oval.....) so we can have precisely the type of object we need.
-Document.pageItem.itemByID() which returns ONLY objects as PageItem whatever their type.
I need to get a precise object(Rectangle, TextFrame).
But, to prevent looping through all PageItems, I am looking for a mixed method which returns a precise object on the same way of second method ( by usind id )
pageItem.getElements(); should resolve the object.
Thanks a lot. That works fine