How to apply two paragraph Style to Table??
| Header 1 | Header 2 | Header 3 | Header 4 |
|---|---|---|---|
| parastyle1 | parastyle2 | parastyle1 | parastyle2 |
| parastyle1 | parastyle2 | parastyle1 | parastyle2 |
| parastyle1 | parastyle2 | parastyle1 | parastyle2 |
| parastyle1 | parastyle2 | parastyle1 | parastyle2 |
Hello,anyGod of the JS
, i have two paragraphstyle, i want to apply to table.
Now i can only apply style to the table. but i dot't know how to apply columns i want to chosse.
pls help me
thankyou very mush^^
var myDoc=app.activeDocument;
var myParagraphStyle = myDoc.paragraphStyles.item("parastyle1");
var myTable = app.selection[0].convertToTable("\t","\r");
myTable.rows.item(0).rowType = RowTypes.headerRow;
myTable.columns.item(0).width = "30 mm";
myTable.columns.item(1).width = "30 mm";
myTable.columns.item(2).width = "30 mm";
myTable.columns.item(0).width = "30 mm";
var celltable = myDoc.cellStyleGroups.item('Cell').cellStyles.item('Table');
myTable.cells.everyItem().appliedCellStyle = celltable;
app.selection[0].applyParagraphStyle(myParagraphStyle, true);