I have a Microsoft Access application that makes these calls in code:

‘Set olApp = New Outlook.Application
    Set olApp = CreateObject("Outlook.Application")

    ‘Create mail item
    Set objMail = olApp.CreateItem(olMailItem)

After having installed Microsoft Outlook 2013 and re-installing Microsoft Outlook 2010 my code now fails on either the New Outlook.Application line or the olApp.CreateItem(olMailItem) line with error:

Automation Error Library not Registered

The cause it turns out is that when Outlook 2013 un-installs it leaves an orphaned registry key:

HKCR\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.5   

Using SysInternals, you can see MSAccess attempting to read this registry key and getting a “No more Entries” error:

image

That key refers to the PrimaryInteropAssemblyName:
Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C

But since you’ve un-installed Outlook 2013 (i.e. Outlook 15) that library no longer exists.

The solution is to delete the registry key:

HKCR\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.5

As soon as that key has been deleted the code reverts to the previous Outlook version listed (9.4) which does exist and life is good again.

Leave a comment if this helped you fix the same problem in your environment.

Advertisements