// get current open docs var adocs = app.documents; var alen = adocs.length; // create new doc var newDocRef = app.documents.add(); var newLayerRef = newDocRef.layers.add(); newLayerRef.name = 'DocMem'; var textFrameRef = newLayerRef.textFrames.add(); var textList; for (i =0; i < alen; i++) { textList += ((adocs[i].fullName).toString() + '\r'); } textFrameRef.contents = textList;