How to script InDesign/InCopy to “Check In” and “Check Out” textFrames?

拈花ヽ惹草 提交于 2019-12-08 07:39:17

问题


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?:

  1. InCopy > Check Out a specific textFrame.
  2. Alter the text within it, or its properties, etc.
  3. InCopy > Check In that textFrame.
  4. Refresh the links so that the other InCopy textFrames in the document are updated with the new info.

Any ideas, please?


回答1:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!