I have this code that works:
var myTable = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
for(i=0; i<myTable.length; i++) {
myTable[i].cells[0].insertionPoints[0].appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Wycena").paragraphStyles.item("Nazwa A. Numeracja2");
}
This code applies one Paragraph Style to all rows in a Table, however what I need is as follows:
- If I paste text that does begin with a bullet symbol (
•
) into a Table then apply "Paragraph Style 1" - If I paste text that does not begin with a bullet symbol (
•
) into a Table then apply "Paragraph Style 2".
What I think I need is an if
statement somewhere, but I cant work it out.