I'm trying to automate the replacement of a number of master spreads across many documents. Unfortunately, I keep getting the following error:
Error Number: 48
Error String: Cannot find the folder " ".
Both of these code snippets give the same result:
var oldDocument = File("/c/Users/me/Desktop/Template.indt") myDocument.loadMasters(oldDocument.fullName);
If I have the document open from which I'm loading the masters, the following code works:
The problem is, I don't want to have that file open while performing the script. Thanks in advance for your help!
Please try the below JS code. i have modified your code its working fine.
app.scriptPreferences.userInteractionLevel=UserInteractionLevels.neverInteract; var oldDocument = File("~/Desktop/Template.indt") app.activeDocument.loadMasters(oldDocument, GlobalClashResolutionStrategyForMasterPage.LOAD_ALL_WITH_OVERWRITE); app.scriptPreferences.userInteractionLevel=UserInteractionLevels.INTERACT_WITH_ALL;
Thanks very much Phil!