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
solve
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:
- Server configuration excel export HResult: 0x800A03EC
- Layer loading failed! Exception from HResult: 0x80040228
- Call Excel to report an error (the exception comes from HResult: 0x80010105 (RPC)_ SERVERFAULT))
- [Solved] emulator: glteximage2d: got err pre 🙁 0x502 internal 0x1908 format 0x1908 type 0x1401
- Exception from HRESULT: 0x80041FE2
- Solve the problem that stdole32.tlb is missing when win7 Microsoft Office 2007 Pro Plus excel is opened
- Win10 (1703) app store download app prompt error code 0x80d0000a
- module ‘win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9‘ has no attribute ‘CLSIDToClassMa
- Visual SVN server provider failed to perform the attempted operation 0x80041024 after win7 upgraded win10
- Solution to the error of win7 & win10 shared printer 0x000000709
- Error 1935. An error occurred during the installation of arcgis10.3 and HResult: 0x80070bc9
- The registered version of ArcEngine can edit the data in SDE (How to Fix 0x80040356 Error)
- Solve the problem that comdlg32.ocx, mscomm32.ocx and other controls cannot be registered under WIN7 64-bit system
- How to Solve Win10 0x8007007E Error (OPC Component)
- Microsoft OLE DB Provider for SQL Server error & #x27;80040e4d & #x27;
- Lack of msvc120d.dll library
- The solution of using OpenGL’s Glu Library in qt5.2 under win7
- OpenGL class library and environment configuration under win10 and vs2015
- Unable to load file D:: program files (x86) node-v16.4.0-win-x861 because scripts are not allowed to run on this system.
- Apache Groovy——java.lang.NoSuchMethodError: x.x.x: method <init>()V not found