Dear all,
I have 10 indd files and each file has one page and a table is only item present on page. So few indd files has table present in one textbox and few files has table in two text boxes because table has many rows so spiltted in two linked text boxes.
I somehow able to select both text boxes but while exporting them only one text box table get exported as png because of improper code.
Pls help.
app.selection[0].exportFile(ExportFormat.PNG_FORMAT, destFile, false); // here i need to correct code.
#target Indesign
var sourceFolder = new Folder ("/Users/admin4/Desktop/INS");
var myFiles = sourceFolder.getFiles();
//alert (myFiles.length);
var destFolder = new Folder ("/Users/admin4/Desktop/folder3");
for (i=0; i < myFiles.length; i++)
{
if (myFiles[i].name !=".DS_Store")
{
var sourceDoc = app.open(myFiles[i]);
app.activeDocument.pageItems.everyItem().select();
//app.activeDocument.stories[0].tables[0].parent.select();
var destFile = File(destFolder + "/" + myFiles[i].name + ".png");
app.selection[0].exportFile(ExportFormat.PNG_FORMAT, destFile, false);
// here i need to correct code.
sourceDoc.close(SaveOptions.NO);
}
}