The question 1 is solved, is fontStyle instead fontStyleName, my mistake..
1 person found this helpful
Your table has a frame's (paragraph TTYTT) width while created by default. Store this value before setting custom width and calculate column width using this as a base.
to find current doc color name collect all collor name in an array and use a trick to match.Something like:
var mDoc, mNames = mDoc.swatches.everyItem().name, mString = "@@" + mNames.join("@@") + "@@", // so we've got a string "@@name1@@name2@@....@@" foundName = mString.match(/[^@]+?2018(?=@@)/), foundColor = foundName ? mDoc.swatches.item(foundName) : false; if (!foundColor) alert ("Color '....2018' not found in a doc: " + mDoc.name);
So var foundColor is false or a color object ready to apply
Thank you so much Jarek!