Copy link to clipboard
Copied
Tried to use the border menu at table set but only is allowed check all 4 sides.
****************
Or at least how to apply to the last row a style (in fact my tables have an empty last row not styled...) since the table configuration does not label it automatically?
main();
function main(){
var myTables = app.selection[0].tables.everyItem().getElements();
for (var i=0; i<myTables.length;i++)
{
myTables[i].bottomBorderStrokeWeight = "1mm";
};
}
This will process ONLY selection - so in order to process whole Story - you need to select all the Text in the Story.
Selecting only one TextFrame - will process only Tables in this TextFrame.
If you select only few Paragraphs in the Text - only Tables in the Selection will get processed.
If yo
...app.activeDocument.stories.everyItem().tables.everyItem().bottomBorderStrokeWeight = "4mm";
(^/)
Copy link to clipboard
Copied
Can you show us a sample-table?
(^/) The Jedi
Copy link to clipboard
Copied
Some tweaking may be needed to get a footer row only where you want it, but that sequence should do it.
This is a Cell Style named 'Footy,' applied in Table Style Options to the Footer row of Table Style 'Footed':
Copy link to clipboard
Copied
Where in the Table STYLE can you define number of Header/Footer rows??
You can only assign CellStyle - but you can't define how many rows there will be...
OP have 100s of tables - and this can only be done in the Table Options - for each table individually - and increasing number of Header / Footer rows - results in InDesgin ADDING - not converting existing - rows...
Unless I'm missing something?
Copy link to clipboard
Copied
Ah... oops. Didn't realize headers/footers were not a style component. Setting tables up involves so many cross-connecting menus... 😛
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You are welcome.
Yes, it's possible to select whole Table - it's trivial - but what do you want to do next?
Copy link to clipboard
Copied
main();
function main(){
var myTables = app.selection[0].tables.everyItem().getElements();
for (var i=0; i<myTables.length;i++)
{
myTables[i].bottomBorderStrokeWeight = "1mm";
};
}
This will process ONLY selection - so in order to process whole Story - you need to select all the Text in the Story.
Selecting only one TextFrame - will process only Tables in this TextFrame.
If you select only few Paragraphs in the Text - only Tables in the Selection will get processed.
If you have Tables in separte Stories - then this code would have to be modified.
There are more setting you can change:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Table.html
Same with Left, Right & Top edges.
Copy link to clipboard
Copied
app.activeDocument.stories.everyItem().tables.everyItem().bottomBorderStrokeWeight = "4mm";
(^/)
Copy link to clipboard
Copied
app.activeDocument.stories.everyItem().tables.everyItem().bottomBorderStrokeWeight = "4mm";
By @FRIdNGE
Yeah, I was trying this as well - but for some reason, it wasn't working for me - but I'm not JS guy.