Error Message if I Ran the Script the Second time!
Hi Experts
I wrote little Script to convert first table rows to header row, and it work good for the first time but if i ran the script again after converting every table first row to header in all tables it give an error? how i can avoid that? because if i add new tables needed to be convert their first row it will not work again and give error!, so how i can let the script ignore the errors and continue to find any new tables needed to be convert its first table row! and thanks in advance
//Convert Every First Table Row to Header Row
var myDoc = app.activeDocument;
var myRows = myDoc.stories.everyItem().tables.everyItem().rows[0].getElements();
for (var i = 0; i < myRows.length; i++) {
if (myRows[i].rowType == RowTypes.BODY_ROW);
myRows[i].rowType = RowTypes.HEADER_ROW;
}The Error Message for the Second time
