Cannot Open .indd template file
Hi,
I have some javascript code that I am porting from CS3 to CS5.
The code was working well on a Windows Server as CS3.
I have ported this to run fine on my local Mac machine on CS5.
As soon as I try to run this on a Mac Server running CS5 I get issues.
Here is the original code snippet.
template = File("/myDirectory/sample_template.indd");
document = app.open(template, true);
The file exists and template.exists is combing back as 'true'.
The error logging coming back is this:
Error: Invalid value for parameter 'openOption' of method 'open'. Expected OpenOptions enumerator, but received TRUE., Invalid value for parameter 'openOption' of method 'open'. Expected OpenOptions enumerator, but received TRUE.
I have tried the following code variations with the following results in red.
document = app.open(template);
Error: Invalid value for parameter 'openOption' of method 'open'. Expected OpenOptions enumerator, but received TRUE., Invalid value for parameter 'openOption' of method 'open'. Expected OpenOptions enumerator, but received TRUE.
document = app.open(template, OpenOptions.OPEN_ORIGINAL);
Error: defaultValue is undefined, defaultValue is undefined
document = app.open(template, OpenOptions.openOriginal);
Error: defaultValue is undefined, defaultValue is undefined
document = app.open(template, OpenOptions.openCopy);
Error: defaultValue is undefined, defaultValue is undefined
I am running this as CS5 (app.scriptPreferences.version = 7;)
Any ideas why app.open() is failing?
Carlos