Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

VBScript giving "Object doesn't support this property or method" error on all versions of InDesign

Community Beginner ,
Sep 29, 2015 Sep 29, 2015

I'm trying to run the VBScript samples and keep getting this error. I've tried running all available versions of InDesign from Creative Cloud on both Windows 7, 32 and 64 bit and on Windows 8. Also tried running InDesign as administrator. Does anyone know what the problem could be?

TOPICS
Scripting
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Sep 30, 2015 Sep 30, 2015

I've managed to solve our problem and I'll just add some additional info provided by adobe support in case anyone else comes across something similar.

" In terms of InDesign registering the type libraries with Windows, it's a two-step process. Firstly, InDesign CC 2015 should write 2 files when it launches if the files don't already exist at these locations:

C:\ProgramData\Adobe\InDesign\Version 11.0\en_US\Scripting Support\11.0\Resources for Visual Basic.tlb

C:\Users\[USERNAME]\AppData\Local\Adobe

...
Translate
Explorer ,
Sep 29, 2015 Sep 29, 2015

first line add

#target indesign

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 30, 2015 Sep 30, 2015

Thank you for your reply!

This will however not help in this case, since not even the sample scripts supplied by Adobe will run from the script panel.

I've managed to get the 64 bit versions of CC 2014 and 2015 to work using the methods described in this post. InDesign 7.0 breaks Visual Basic reference

The 32 bit versions running on 32 bit systems are still giving me problem though.

I will update this thread if I learn anything else.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Sep 30, 2015 Sep 30, 2015

First of all, the #target directive is only supported in javascript.
Second, the error you reported seems to be pointing to a error in your code (you are trying to access an inexistent property of some object, like, for example myObject.tables, when myObject is a Image). But without more details and the actual code, i don't think anyone will be able to help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 30, 2015 Sep 30, 2015

Thank you for replying.

I am not trying to run my own script, that is not the problem. The problem I am having is not being able to run even the sample scripts provided by Adobe.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 30, 2015 Sep 30, 2015
LATEST

I've managed to solve our problem and I'll just add some additional info provided by adobe support in case anyone else comes across something similar.

" In terms of InDesign registering the type libraries with Windows, it's a two-step process. Firstly, InDesign CC 2015 should write 2 files when it launches if the files don't already exist at these locations:

C:\ProgramData\Adobe\InDesign\Version 11.0\en_US\Scripting Support\11.0\Resources for Visual Basic.tlb

C:\Users\[USERNAME]\AppData\Local\Adobe\InDesign\Version 11.0\en_US\Caches\Scripting Support\11.0\Resources for Visual Basic.tlb

It should also create the following registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{451AF4B6-5D30-4D46-95CE-E4F900BF2D44}\1.0\0\win32
value = C:\Users\[USERNAME]\AppData\Local\Adobe\InDesign\Version 11.0\en_US\Caches\Scripting Support\11.0\Resources for Visual Basic.tlb

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{7C8B1C08-7618-477F-A2EC-D6DC4BCD6B06}\1.0\0\win32
value = C:\ProgramData\Adobe\InDesign\Version 11.0\en_US\Scripting Support\11.0\Resources for Visual Basic.tlb

Secondly, those tlb files need registered with Windows. If the tlb files are created, you can force the registration using regtlibv12.exe, passing 'Resources for Visual Basic.tlb' "

The only way I could get InDesign to generate new .tlb files was to either remove or add a plugin and then launch it as an administrator. This also lead me to find the problem, one of our internal plugins had a duplicate CLID in it's scripting objects which must have prevented InDesign from loading the .tlb.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines