Answered
Try to Apply Paragraph Style for Even and Odd Paragraphs
Hi Experts,
im trying to apply Paragraph Style1 for the first paragraph then apply Paragraph Style2 for the next and loop that in the selected frame, but it only apply to first one and stopped!, here is the code and thanks in advance :
var myFrame = app.selection[0].paragraphs[0];
for (i=0; i < myFrame.paragraphs.length; i++){
if (i % 2 == 0){
myFrame.parentStory.paragraphs[i].appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Style1");
}
else if (i % 2 !== 0){
myFrame.parentStory.paragraphs[i].appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Style2");
}
}
