Copy link to clipboard
Copied
I have a script that has been working for years, then I think there was a windows update that broke it. I am using vb.net and InDesign 2018.
The error I get is Unable to cast COM object of type 'System.__ComObject' to interface type 'InDesign.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
This is only happening on some of my client machines that run this. My development machine does not break. The script is very simple it is just resizing text in text frames, so I will just post where it is failing (when it references the document). It seems like the InDesign dll registrations in Windows have broken somehow.
Dim myIndesign As InDesign.Application = CreateObject("InDesign.Application.CC.2018")
myDocument = myIndesign.ActiveDocument
myLayer = myDocument.Layers.Item("Layer 1")
myTextFrames = myLayer.TextFrames.Count
For myCounter = 1 To myTextFrames
Thanks for any help.
1 Correct answer
The link to the thread about registering the tlb file kind of worked. If any of you have the problem again on Windows 10, here is what I had to do.
1. copy the regtlibv12.exe from a Windows 7 computer because it is not there in Windows 10
2. run the command C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe "C:\ProgramData\Adobe\InDesign\Version 9.0\de_DE\Scripting Support\9.0\Resources for Visual Basic.tlb"
3. delete the resources.tlb file from c:\programdata\adobe\indesign\{versionx}
...Copy link to clipboard
Copied
To quote myself Re: InDesign CS6 scripts don't work on CC anymore
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
See more there, also see Re: Create Indesign.Application CC
Copy link to clipboard
Copied
The link to the thread about registering the tlb file kind of worked. If any of you have the problem again on Windows 10, here is what I had to do.
1. copy the regtlibv12.exe from a Windows 7 computer because it is not there in Windows 10
2. run the command C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe "C:\ProgramData\Adobe\InDesign\Version 9.0\de_DE\Scripting Support\9.0\Resources for Visual Basic.tlb"
3. delete the resources.tlb file from c:\programdata\adobe\indesign\{versionx}\en_us\scripting support\{version}
4. run InDesign as administrator.
Now my script works again.
Copy link to clipboard
Copied
Did you try just deleting the .tbl so that it regenerates itself and in didn't work so you used the regtlibv12.exe method or did you go strait for the regtlibv12.exe method?
Copy link to clipboard
Copied
I tried deleting the tlb first, but that didn't take care of the issue. That has resolved my issue in the past, but this time after the most recent set of windows updates it didn't seem to take care of the issue w/o registering the tlb.
Copy link to clipboard
Copied
Thanks, I marked your answer as correct, you can now mark mine as helpful
Copy link to clipboard
Copied
The above issue happened to me. There is no such C:ProgramData folder not found in my system. I have using VS2019 and adobe Indesign CS6. I want to open a IDML file and load an XML. Kindly suggest me.
Copy link to clipboard
Copied
Did you try locating the tlb file on your machine, deleting it if found, and then lauching InDesign as admin so that the tlb file is regenerated? If this does not help you then create a new post as this is a very old post and you would not get much help on this one.
-Manan
Copy link to clipboard
Copied
I'm pretty sure running InDesign as admin ONLY re-creates TLB file - but doesn't register it in the system.
@Aysha27550661f9sm this is original place for the tool - links to ZIPs no longer work:
And here is a copy with working ZIPs:
Remember to run this utility as admin to let it properly register TLB file in the system.
Copy link to clipboard
Copied
Thanks for the insight @Robert at ID-Tasker. In my limited experience so far with using InDesign tlb file, I never had to register it explicitly.
-Manan

