Question
How do I modify this script , make it duplicates the currently selected rows
How do I modify this script , make it duplicates the currently selected rows
Then add a empty at the table top
//first table in the active document
var table=app.activeDocument.textFrames[0].parentStory.tables[0]
dupeTopRow(table);
table.rows.add(LocationOptions.BEFORE, table.rows[0]);
/**
* duplicate the first row af a table
* @ param the table
* @ return void
*/
function dupeTopRow(t){
var nr = t.rows.add(LocationOptions.BEFORE, t.rows[0]);
var c = nr.cells
var lr = t.rows[1].cells
for (var i = 0; i < c.length; i++){
c[i].properties = lr[i].properties;
};
}