Hi Forum,
Thanks for your support so far. I have come up with new request, please anyone there to quench by thirst;
actually i want to replace, cell[1] of the every rows of every table with cell[0] of every rows of every table.
I dont think its a right way of doing this like i doing now;;
myPage =app.activeDocument.pages.everyItem();
var mytable =myPage.textFrames.everyItem().tables.everyItem().columns[0];
mytable.remove(myPage.textFrames.everyItem().tables.everyItem().column s[1]);
myPage.textFrames.everyItem().tables.everyItem().convertToText("\t","\ r");
Also, i tried in this way.... but script find only the first instance and replace... and not the next cell[1] with cell[0] on next row..
myPage =app.activeDocument.pages.everyItem();
var mytable =myPage.textFrames.everyItem().tables.everyItem();
var c1 =mytable.rows.everyItem().cells[0].contents;
var c2 = mytable.rows.everyItem().cells[1].contents;
app.findTextPreferences = null; |
app.changeTextPreferences = null;
app.findTextPreferences.findWhat =c1;
app.changeTextPreferences.changeTo =c2;
app.changeText();
please help on this..