I am trying to apply character styles to certain parts/entire rows and columns.
I can change individual cells with the code below. . .
table = app.selection[0];if (table.hasOwnProperty("baseline")) table = table.parent;if (table instanceof Cell) table = table.parent;if (table instanceof Column) table = table.parent;if (table instanceof Row) table = table.parent;if (table instanceof Table) {
table.rows[0].cells[6].texts[0].appliedCharacterStyle = "none report";}
. . . but when I try to select an entire row, I get the error “Object does not support the property or method ‘texts.’” when I try either of the following two codes.
{
table.rows[0].cells.texts.appliedCharacterStyle = "none report";}
{
table.rows[0].cells.appliedCharacterStyle = "none report";}
Does anyone know how can I do the following?
1. Select any row (or column) and apply character style
2. Select last row (no matter how many rows are in the table,) and apply character style
3. Apply character style to specific columns (except top two cells)
Thank you!