apply paragraphStyles Inbetween paragraphStyles
Hi Forum,
this is the script im trying to change paragraphStyles[BodyText_Indent] of paragraphs between "bullet" style and "bullet_2" style.
only one instance is happenning after "bullet" style and before "bullet_2" style.
please help!...
myDoc = app.activeDocument;
for (j = myDoc.stories.length - 1; j >= 0; j--) {
myStory = myDoc.stories.item(j);
myParas = myStory.paragraphs;
// if (myParas.length > 5) {
for (i = 0; i <myStory.paragraphs.length; i++) {
if (myStory.paragraphs.appliedParagraphStyle == myDoc.paragraphStyleGroups.item("Bullet").paragraphStyles.item("Bullet"))
myStory.paragraphs[i+1].appliedParagraphStyle = myDoc.paragraphStyleGroups.item("Bullet").paragraphStyles.item("Bullet_Indent")
if (myStory.paragraphs.appliedParagraphStyle == myDoc.paragraphStyleGroups.item("Bullet").paragraphStyles.item("Bullet_2"))
myStory.paragraphs[i-1].appliedParagraphStyle = myDoc.paragraphStyleGroups.item("Bullet").paragraphStyles.item("Bullet_Indent");
}}