Hier ist ein Skript:
//SplitSelectedStory.js
//An InDesign CS JavaScript
//
//Splits the text frames of the selected story into separate stories, retaining
//the position, content, and formatting of all of the text frames in the story.
//
//For more information on InDesign scripting, go to
http://www.adobe.com/...esign/scripting.html //Or visit the InDesign Scripting User to User forum at
http://www.adobeforums.com. //
if(app.documents.length != 0){
if(app.selection.length > 0){
switch(app.selection[0].constructor.name){
case "Text":
case "InsertionPoint":
case "TextFrame":
mySplitStory(app.selection[0].parentStory);
break;
default:
alert("Please select some text (or a text frame) try again.");
break;
}
}
else{
alert("Nothing is selected. Please select some text (or a text frame) try again.");
}
}
else{
alert("No documents are open. Please open a document and try again.");
}
function mySplitStory(myStory){
var myCounter;
if(myStory.textFrames.length != 1){
for(myCounter = myStory.textFrames.length-1; myCounter >= 0; myCounter --){
var myTextFrame = myStory.textFrames.item(myCounter).duplicate();
}
for(myCounter = myStory.textFrames.length-1; myCounter >= 0; myCounter --){
myStory.textFrames.item(myCounter).remove();
}
}
}