Reply To: Changing many cells fill colour

Home Page / Forums / General InDesign Topics (CLOSED) / Changing many cells fill colour / Reply To: Changing many cells fill colour

#104689
Vinny –
Member

Something like this maybe?

if (parseFloat(app.version) < 6) {
main();
}else{
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “Change cyan tint”);
}

function main() {

if (app.documents.length > 0) {

//Variables
var
myDoc = app.documents[0],
myCells = myDoc.stories.everyItem().tables.everyItem().cells.everyItem().getElements();

for (i = 0; myCells.length > i; i++) {

if (
myCells[i].fillColor.name != ‘None’ &&
myCells[i].fillColor.colorValue == ‘100,0,0,0’ &&
myCells[i].fillTint == 5) {
myCells[i].fillTint = 10;
}
}

} else {
alert(“Open a document”);
return null
}
}

https://codeshare.io/G8ZPlD

This article was last modified on July 2, 2018

Comments (0)

Loading comments...