1

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?

RobC
  • 22,977
  • 20
  • 73
  • 80
Sturm
  • 689
  • 2
  • 23
  • 52

1 Answers1

2

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();
}
dln385
  • 11,630
  • 12
  • 48
  • 58
  • That did it, dln385! Who'd have known that it would be as simple as a `.checkOut()`, `.checkIn()`, and `.recompose()` set of methods? I guess the trick was to know to apply it to the parentStory rather than the textFrame itself. Thanks again! – Sturm Jun 10 '13 at 15:44
  • 2
    Here's how I found the answer. On Windows: Download [this searchable InDesign CS6 Object Reference](http://jongware.mit.edu/idcs6jschm.zip) from JongWare and extract it. Open the CHM file, select the "Search" tab, and enter "checkout". From here I noticed that TextFrame was not in the results but Story was. Then I browsed the methods of Story and made a guess. On Mac: Install [iChm](http://www.robinlu.com/ichm) and follow the rest of the steps. – dln385 Jun 10 '13 at 19:38