How to operate only on selected cells in a table?
How to operate only on selected cells in a table?
Thanks to so many enthusiastic people for the pointers., I've learned that I can operate on the current table accurately.
I would also like to know how to operate on the currently selected cell.
For example, in the script below, the entire table is now filled with “-” for empty cells.
How do I change it to only modify the selected cells.
Thank you very much.
var cell = app.activeDocument.selection[0].parent;
var myTable = cell.parent;
for (var i=0; i<myTable.columns.length; i++){
for (var j=0; j<myTable.columns.item(i).cells.length; j++){
if (myTable.columns.item(i).cells.item(j).contents == ""){
myTable.columns.item(i).cells.item(j).contents ="-";
}
}
}


