Answered
This topic has been closed for replies.
Here's a script I use to break a story on instances of a paragraph style. It assumes that the paragraph is set to start on the next page or frame.
To use it, place the cursor in the paragraph style (the one applied to 'New Articles' in your sample) and run the script. As always, keep a copy of the document in a safe place.
//DESCRIPTION: Split a story on the selected paragraph style
(function () {
var styleName = app.selection[0].appliedParagraphStyle.name;
var story = app.selection[0].parentStory;
var p = story.paragraphs.everyItem().getElements();
var frame;
for (var i = p.length-1; i >= 1; i--) {
if (p[i].appliedParagraphStyle.name === styleName) {
frame = p[i].parentTextFrames[0];
frame.previousTextFrame = null;
story.insertionPoints.itemByRange (p[i].index, story.length)
.move (LocationOptions.AFTER, frame.insertionPoints[0]);
}
}
}());Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

