Searching a Book Using ExtendScript
I'm searching a book using ExtendScript. I can do it opening each document individually using the code below. Is there a better way; possibly something like: var book = app.ActiveBook; var comp = book.FirstComponentInBook; comp = comp.NextBookComponentInDFSOrder? I ran across some script using these objects and methods from 2013, but it didn't work with my test book.
//Code that works to step through all docs in book
doc = app.FirstOpenDoc;
while (doc.ObjectValid()) {
doc = SimpleOpen(doc.Name);
doc = app.ActiveDoc;
// findAndChange(doc)
doc = doc.NextOpenDocInSession; // Open next document in book
}
