Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: How to select two text boxes (linked) separated by a distance?

$
0
0

Dear Uwe, Many thanks for your points.

I have 10 indd files and each file has one page and a table is only item present on page. So few files has table present in one table and few files has 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.

 

 

#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);

 

    }

}


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>