Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

tab leaders in tables

$
0
0

Hi,

 

Anyone please suggest my code errors?

 

I need the leader dots in every first column of all the tables. tabs need to be stop before 6pts of the column width.

 

var myDoc = app.activeDocument;   

var myTable = myDoc.stories.everyItem().tables.everyItem().getElements();   

for(t=0; t<myTable.length; t++)   

{  

    var col = myTable[t].columns[0].select();

    var myFirstColumn = myTables[t].columns[0].width; 

    app.findGrepPreferences = app.changeGrepPreferences = null; 

    app.findGrepPreferences.findWhat = "(.+)$"; 

    found = app.selection[0].findGrep (true); 

for (i = 0; i < found.length; i++) 

{

  found[i].insertionPoints[-1].contents = "\t";

  TabStops.position = myFirstColumn - "6pt";      

}

 

 

The code shows the below error.

 

 

Regards,

Velu


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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