Old Script doesn't work with InDesign 2026.
I have a script that no longer works with the update and I have no clue on how to fix it.
The script is supposed to open the first file in the book print (located in the C:\ folder mentioned), update the links, save and close the file and then open the next file in the book and repeat until all files are linked and saved.
I would appreciate any help someone can give.
//Set the user interaction level to NEVER
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
//Perform open of a sample book
var myBook = app.open("C:\\forms\\0210.files\\zprint.indb", false),
i, docPath, doc, j;
for (i = 0;i<myBook.bookContents.length;i++){
docPath = myBook.bookContents[i].fullName;
doc = app.open(File(docPath), false);
for (j = 0; j < doc.links.length; j++) {
doc.links.item(j).relink(File(doc.links.item(j).filePath));
}
doc.save(docPath);
doc.close();
}
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
