@Lukas – I'm on Mac OSX, so cannot be very helpful with that.
Do the pre-installed Adobe sample VB Scripts work for you?
Hm. I think, this thread should be moved to the InDesign Scripting Forum…
Oh, sorry! I forgott to write that. No, the preinstalled scripts don't work either. Only the java scripts work fine.
@Peter: Thanks, but resetting the "InDesign Defaults" didn't solve the problem...
See this quote from the top secret VB indesign manual
A script must always target the version of InDesign under which it is running (the current version), either
explicitly or implicitly. Targeting is implicit when the script is launched from the Scripts panel.
Otherwise, explicit targeting for Visual Basic applications and VBScripts is done using the CreateObject
Rem Target InDesign CC Roman:
Set myApp = CreateObject("InDesign.Application.CC")
Rem Target InDesign CC J:
Set myApp = CreateObject("InDesign.Application.CC_J")
Rem Target the last version of InDesign that was launched:
Set myApp = CreateObject("InDesign.Application")
In practice change the line in the scripts from Set myInDesign = CreateObject("InDesign.Application")
For CC9 to Set myInDesign = CreateObject("InDesign.Application.CC")
and for CC2014 to Set myInDesign = CreateObject("InDesign.Application.CC.2014")
Thanks for the hint, but neither the simplest script works - without any instance of InDesign defined/created. In CS6 this script worked very well:
Is there something else to define the InDesign version in a script? Or how can I target a InDesign version without an InDesign instance/object in the script?
I also tried to create an instance of InDesign with
Set idApp = CreateObject("InDesign.Application.CC")
and it didn't work...
In the documentation I found:
"[...] Targeting is implicit when the script is launched from the Scripts panel. [...]"
Which means, that I don't have to target to a specific version of InDesign, right?
Which means also, that the problem has to be anywhere else...?
I'm not too sure about the targeting point in practice when it comes to CC.
It sounds like you need to regenerated the .tlb files which are store somewhere like C:\ProgramData\Adobe\InDesign\Version 9.0\en_IL\Scripting Support\9.0
Rename the Resource file there and re-run indesign with administrative privileges.
Also if you don't have CC2014 then install that and see if things work on it.
thanks for the help! The regeneration of the .tlb files did the trick. Now my scripts work on InDesign CC, too.
Thanks a lot!