Copy link to clipboard
Copied
We are trying to create a script to accept track changes
There is a conversation here:
https://community.adobe.com/t5/indesign-discussions/find-change-specific-tables/m-p/9760163
Search for the anchored character.
"<0016>"
Copy link to clipboard
Copied
Both
app.documents[0].stories.everyItem().tables.everyItem().changes.everyItem().accept();
and
app.documents[0].stories.everyItem().tables.everyItem().cells.everyItem().changes.everyItem().accept();
work fine over here. Maybe contact the plug-in developer and report the problem.
Copy link to clipboard
Copied
Are the stories locked, or checked out to InCopy?
Copy link to clipboard
Copied
Thank you for your response. I hadn't realised that the table was nested in another table and this seemed to be the problem. I was given a solution which was:
Copy link to clipboard
Copied
Your code will still not get all the tables in the document. It will work only on the 1st level of nested tables. To get all the tables however deep they are nested in a table, try the following code
/*
https://community.adobe.com/t5/indesign-discussions/accepting-track-changes-in-tables/td-p/13181717
Script to get an array of all the talbes present in a document
Pre Requisite:- The script needs an open document
Warning :- No elaborate error checking
Author:- Manan Joshi
Guthub Repo :- https://github.com/Manan-Joshi/InDesign-Scripts.git
*/
function getTables(pCol){
var retval = [];
var tables = pCol.everyItem().tables.everyItem().getElements()
retval = retval.concat(tables)
for(var i = 0; i < tables.length; i++){
retval = retval.concat(getTables(tables[i].cells))
}
return retval
}
var tables = getTables(app.documents[0].stories)
-Manan
Copy link to clipboard
Copied
There is a conversation here:
https://community.adobe.com/t5/indesign-discussions/find-change-specific-tables/m-p/9760163
Search for the anchored character.
"<0016>"