How to access contents of textframe

10-11  Source: Network gathering  Views:0 

Hi all
I've a textframe which contains the group of images pasted using 'paste into' command, any idea how to access the contents using script, i've tried
var inlineFrame = myDocument.stories.everyItem().textFrames.everyItem().getElements();
unfortunately this doesnt work for this case as the images or textframes are pasted using pasteInto command.
any suggestions ?
Try this:
#target InDesign
var _allRectangles = app.activeDocument.rectangles.everyItem().getElements();
for (i=0; i<_allRectangles.length;i++) {   
     if (_allRectangles[i].groups.length > 0) {       
           var _imgArray = _allRectangles[i].groups[0].rectangles.everyItem().images.everyItem().getElements();
           alert("Rectangle " + i + " contains a group with " + _imgArray.length + " images.");
Related articles