No Insertion Point or Active Document
My find/change script steps through each document in a book as it executes. At the start of the script, I read each doc filename in the book into an array and then use the SimpleOpen method to make each document active; something I picked from a post a few months ago. However, I sometimes get an error that says, "No insertion point or active document. Cannot continue." Any thoughts on what I might do to fix this? I searched the forum, but no luck. Here's the code I'm using to open/activate each doc.
// Open each doc using doc.Name and call executeHitlist function
function searchDocs () {
for (k = 1; k <= docCount; k++) {
doc = SimpleOpen(openDocs[k]);
$.writeln("Searching " + doc.Name + "...");
doc = app.ActiveDoc;
executeHitlist ();
}
}
