unable to cast com object error
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.
