Copy link to clipboard
Copied
Copy link to clipboard
Copied
(function() {
if (app.documents.length > 0
&& app.selection.length > 0) {
var myTable = findTable(app.selection[0]);
if (myTable == null) { return }
var myStyles = myTable.cells.everyItem().appliedCellStyle;
for (var j = myStyles.length -1; j >= 0; j--) {
//~ for (var j = 0; myStyles.length > j; j++) {
if (myStyles.name != "None") {
myTable.cells.appliedCellStyle = myStyles;
}
}
}
}());
function findTable(obj) {
if (obj instanceof TextFrame) {
return obj.tables[0];
}
while (obj.constructor.name != "Table") {
obj = obj.parent;
if (obj.constructor.name == "Application") {
return null;
}
}
return obj
} // end findTable
Click in a table and run it. Change the loop to go the other way (just comment out the currently active for loop and activate the other one). If you get the same result, your cell styles are compatible and can coexist in adjacent cells, but if you don't the problem is your styles not InDesign behaving badly when rendering.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more