TYPE_E_CANTLOADLIBRARY and TYPE_E_LIBNOTREGISTERED failure

SUMMARY

If you recently uninstalled Outlook 2013 or have a problem with our your Outlook installation then you may encounter the following error messages when syncing with gSyncit ...

Error = "A Outlook component failed to load due to a problem with the Outlook installation"

Error = Internal error. Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).

The root issue is that their is a problem with the Outlook installation Common Object Model (COM) interface where the version referencefor the TypeLib entry set by the Outlook installation is pointing to a incorrect value/version or that version does not point to a correct location. The following steps should help correct the most common cause of this issue issue. If you continue to have issues then you may beed to reinstall Microsoft Outlook. Repairing the Outlook installation does not fix this issue so a reinstall is suggested.

RESOLUTION

Fix the Interface

  1. Access the Windows Registry Editor by running RegEdt32.exe from the Windows start menu.
  2. Navigate to each of the keys that exist (depends on if using the 32 ot 64 bit version of Outlook/Windows)...
    1. HKEY_CLASSES_ROOT\Interface\{00063001-0000-0000-C000-000000000046}\TypeLib
    2. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\Interface\{00063001-0000-0000-C000-000000000046}\TypeLib
    3. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Classes\Interface\{00063001-0000-0000-C000-000000000046}\TypeLib
  3. Find a '(Default)' entry with the value '{00062FFF-0000-0000-C000-000000000046}'
  4. Locate the 'Version' entry and confirm this version matches the value in the following table based on the version of Outlook currently installed.

    Outlook Version
    Outlook 20009.0
    Outlook 20029.1
    Outlook 20039.2
    Outlook 20079.3
    Outlook 20109.4
    Outlook 20139.5
    Outlook 20169.6
    Outlook 20199.6

Fix the TypeLib

  1. Navigate to HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}

  2. Delete the version keys (e.g. 9.5) for any version of Outlook that is not installed on your system based on the version table provided below. For example, if you are not using Outlook 2013 then remove the "9.5" entry. If you are not using Outlook 2010 then remove the the "9.4" entry. DO NOT DELETE the entry for the version that is currently installed.

    Outlook Version
    Outlook 20009.0
    Outlook 20029.1
    Outlook 20039.2
    Outlook 20079.3
    Outlook 20109.4
    Outlook 20139.5
    Outlook 20169.6
    Outlook 20199.6

Ensure MSOUTL.LIB is Registered

  1. In the previous fix the typelib section, make sure that the registry key value ending with MSOUTL.OLB is pointing to a valid file location.
  2. The key location should be something like HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.6\0\Win64
  3. Download regtlibv12.exe to your computer
  4. Go the Windows Start Menu and type cmd.
  5. In the search results, right-click Run as Administrator...
  6. Change directory to where you downloadedcd %USERPROFILE%\Downloads
  7. Execute the following command, where <msoutl.olb file> is the value taken from step #3: regtlibv12.exe "<msoutl.olb file>".

    For example: regtlibv12.exe "C:\Program Files\Microsoft Office\root\Office16\MSOUTL.OLB"