[solved] win10 + office2016 error: library not registered, HResult: 0x8002801d

Sad today

{0} cannot cast a COM object of type ‘Microsoft. Office. Interop. Word. Applicationclass’ to interface type’ Microsoft. Office. Interop. Word_ Application”。 This operation failed because the queryinterface call to the COM component of the interface with IID “{00020970-0000-0000-c000-000000000046}” failed with the following error: the library is not registered( Exception from HResult: 0x8002801d (type_ E_ LIBNOTREGISTERED))。”}

My situation

1. Win10 + 64 bit
2. Re installed office2016, but previously uninstalled the professional version of office2016 and WPS


Re install WPS, it’s OK.

Cause of error

WPS component conflicts with office component. This thing {00020970-0000-0000-c000-000000000046} may be related to WPS, and then I didn’t uninstall it completely. After the WPS is re installed, it will register the component, so no error will be reported.

reference resources

Thank you very much for your inspiration:
C # importing excel2010 has the problem of DLL loading failure or unregistered class library, 0x8002801d or 0x80029c4a

And, if you are not sure about the root cause of the error, you can try step by step:
failed to retrieve the component with CLSID {000209ff-0000-0000-c000-000000000046} in the com class factory, because of the following error: 80070005 denied access
there are four methods listed in this article. Of course, the simplest and most crude method is the last resort, which is to reload the system.

Read More: