none
Can't instantiate Access: How to avoid 80040154 Class not registered exception

    Question

  • In a simple .NET 4.6.1 console app targetting the x86 platform, this line:
    var accessApplication = new Access.Application();
    is throwing:
    Retrieving the COM class factory for component with CLSID {73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    I'm running Microsoft Access 2016 MSO (16.0.8431.2110) 32-bit on a Windows 10 machine version 1607 (OS Build 14393.1884).

    I get this exception with the installed version of Microsoft.Office.Interop.Access and also with the latest nuget version (15.0.4420.1017).

    Any ideas?
    Friday, February 9, 2018 10:55 PM

Answers

  • This issue resolved itself after I ran the Office Quick Repair wizard.

    For the uninitiated, the repair wizard can be launched via:

    • Control Panel\Programs\Programs and Features
    • Right-click on Microsoft Office 365 ProPlus - en-us (here I had two similarly named entries both installed on the same date)
    • Change
    • Quick repair

    • Marked as answer by Calvin Craig Saturday, February 10, 2018 12:16 AM
    • Edited by Calvin Craig Saturday, February 10, 2018 12:17 AM
    Saturday, February 10, 2018 12:16 AM

All replies

  • I discovered that while this code throw on my desktop machine, it runs fine on my laptop.

    I'm running different builds on my laptop:

    Microsoft Access 2016 MSO (16.0.9001.79096) 32-bit and Windows 10 Build 10240.


    Friday, February 9, 2018 11:52 PM
  • This issue resolved itself after I ran the Office Quick Repair wizard.

    For the uninitiated, the repair wizard can be launched via:

    • Control Panel\Programs\Programs and Features
    • Right-click on Microsoft Office 365 ProPlus - en-us (here I had two similarly named entries both installed on the same date)
    • Change
    • Quick repair

    • Marked as answer by Calvin Craig Saturday, February 10, 2018 12:16 AM
    • Edited by Calvin Craig Saturday, February 10, 2018 12:17 AM
    Saturday, February 10, 2018 12:16 AM