"Library not registered" error when trying to access COMAddIns collection

Add-in Express™ Support Service
That's what is more important than anything else

"Library not registered" error when trying to access COMAddIns collection
 
Grey Wolf




Posts: 6
Joined: 2009-09-20
I have Vista Ultimate 32 bit and Word 2007, and my VCL COM Add-In created with Add-in Express Version 6.0 Release (build 753) with Delphi 7 for Word.
The Add-in registers itself normally, and I see button in the MS Word ribbon toolbar, and I can click on this button and use the Add-In.
But when I try to use automation (i.e., I have separate program - EXE, and instantiate Word through CreateOleObject from there, and want to connect to my Add-In) to access the Word and Add-in, on the line

if Assigned(fIWord.COMAddIns) then

I constantly get an EOleException: "Library not registered."
I.e., I can successfully obtain Application interface word2000.IID__Application, and at least "Version" method on this interface works OK, but when I try to access the Add-Ins collection, the mentioned error appears.
I tried to do repair installation of Office, to register all type libraries in the project with utility which comes with Delphi 2010, complete install/reinstall of Office 2007 with Word 2007, installation and deinstallation of Primary Interop Assembly for Office 2007, but with no success.
On this Vista system previously were installed Office 2003 and another Office 2007 distributive. It seems that something had been broken in the registry.
On several other OSes with various (2000-2010) installed Word version the exact same code works well.
The issue most likely is not connected with my Add-In express plugin, but I nevertheless ask for any advices.
Posted 25 Dec, 2010 15:03:41 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Grey,

Thank you for the detailed description.

I am afraid I don't know the exact reason of this strange exception and it seems you are right in your assumptions about broken registry settings.

I would suggest reinstalling Office 2007 completely, sorry, I don't know how to solve this problem in other way at the minimum time.
Posted 28 Dec, 2010 06:07:32 Top