Copy link to clipboard
Copied
Hi, I have tables with different values of bottoms cell inset. I would like to change the value of those who have 2mm for 3mm. I tried a few things but they change all the bottom cell insets. Thanks!
// by FRIdNGE, november 2018
var myCells = app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().getElements();
for (var c = 0; c < myCells.length; c++) if ( myCells
.bottomInset == 2 ) myCells .bottomInset = 3;
Best,
Michel
Copy link to clipboard
Copied
Hi Marie,
try this,
var myDoc = app.documents[0];
var table = myDoc.pages[0].textFrames[0].tables[0].cells;
for(var i = 0; i < table.length; i++){
if(table.bottomInset == "2"){
table.bottomInset = "3";
}
}
Copy link to clipboard
Copied
Awesome! Thank you so much
Copy link to clipboard
Copied
Your welcome dear
Copy link to clipboard
Copied
Sure? …
Best,
Michel, for FRIdNGE
[Sorry to disagree once again!]
Copy link to clipboard
Copied
well, I tried on a document with only one table, but when I'm in a larger file with a lot of tables it make a error.
Copy link to clipboard
Copied
// by FRIdNGE, november 2018
var myCells = app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().getElements();
for (var c = 0; c < myCells.length; c++) if ( myCells
.bottomInset == 2 ) myCells .bottomInset = 3;
Best,
Michel
Copy link to clipboard
Copied
Thank you!