Answered
Can I separate all linked text frames from each other in the InDesign document?
Split 3.0 is working great for me in a selected story. Can I separate all linked text frames from each other in the InDesign document? Thank you.
Split 3.0 is working great for me in a selected story. Can I separate all linked text frames from each other in the InDesign document? Thank you.
Hi @uniq1, I've used the functions from SplitStory.jsx sample script to split all stories in active document. - Mark
Thanks @Eugene Tyson, for pointing me to the sample script!
/**
* Split all stories in active document;
*/
function main() {
var doc = app.activeDocument,
stories = doc.stories,
counter = 0;
for (var i = stories.length - 1; i >= 0; i--) {
var story = stories[i];
if (story.textContainers.length == 1)
continue;
//Splitting the story is a two-step process: first, duplicate
//the text frames, second, delete the original text frames.
mySplitStory(story);
myRemoveFrames(story);
counter++;
}
alert('Split ' + counter + ' stories.');
};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Split All Stories');
// from the sample script: SplitStory.jsx
function mySplitStory(myStory) {
var myTextFrame;
//Duplicate each text frame in the story.
for (var myCounter = myStory.textContainers.length - 1; myCounter >= 0; myCounter--) {
myTextFrame = myStory.textContainers[myCounter];
myTextFrame.duplicate();
}
};
// from the sample script: SplitStory.jsx
function myRemoveFrames(myStory) {
//Remove each text frame in the story. Iterate backwards to avoid invalid references.
for (var myCounter = myStory.textContainers.length - 1; myCounter >= 0; myCounter--) {
myStory.textContainers[myCounter].remove();
}
};
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.