I am not very familiar with InCopy. I keep seeing that it's a separate application, but I only have InDesign CS6 here, no InCopy CS6. Yet I am able to access InCopy functions within InDesign, such as "checking out/in" various textFrames for editing, then refreshing them in the Links panel so they update other textFrames on other pages in the document.
My question is this—How can I use ExtendScript to automate this process?:
- InCopy > Check Out a specific textFrame.
- Alter the text within it, or its properties, etc.
- InCopy > Check In that textFrame.
- Refresh the links so that the other InCopy textFrames in the document are updated with the new info.
Any ideas, please?
Do you have any code that you've tried so far?
I'm taking a stab in the dark here, but I might start off with something like this:
var story = textFrame.parentStory;
story.checkOut();
story.contents += " This is added to the end.";
story.checkIn();
story.recompose();
var linksArr = document.links.everyItem().getElements();
for (var i = 0; i < linksArr.length; i++) {
linksArr[i].update();
}
来源:https://stackoverflow.com/questions/16992465/how-to-script-indesign-incopy-to-check-in-and-check-out-textframes