Delete last row in all tables in an Indesign document
Hi,
I have a number of documents with numerous tables in them - I would like to be able to write a simple script (with Extendscript/Javascript) to delete the last row of every table on the current open document. Any pointers/help would be really appreciated.
Thank you.
I have the code below (I assumed I could use "allTables.rows.delete(LocationOptions.AT_END)" but not sure it is right!...
//get all the 'stories' in the document
var documentStories = app.activeDocument.stories.everyItem();
//get all of the tables from within the stories
var allTables = documentStories.tables.everyItem().getElements();
//delete the last row of every table
allTables.rows.delete(LocationOptions.AT_END);
