C # solutions to some problems exported by Word (multiple methods ),

Source: Internet
Author: User

C # solutions to some problems exported by Word (multiple methods ),

You can find multiple solutions to the following problems online:

I will write my own operations for your reference.

In addition, list the solutions of other people as much as possible.

Hope to help you

1. the COM Object of the type "Microsoft. Office. Interop. Word. ApplicationClass" cannot be forcibly converted to the interface type "Microsoft. Office. Interop. Word. _ Application ". The reason for this operation failure is that the QueryInterface fails to be called for the COM component of the interface with the IID of "{00020970-0000-c000-000000000046}" due to the following error: the library is not registered.

This problem should be caused by the installation of different versions of the computer's Office.

It may be that a new version has been installed before, and a new version has been uninstalled, so the registry is not cleaned up.

So I went to the Internet to find some uninstall tools of various versions, and cleaned up the remaining items of installed versions first. And then reinstall the office (2003 ). Go to the Registry and check if there are any other versions of items left behind. If so, delete them.

After the installation is complete, the problem is solved.

2. the COM Object of the type "Microsoft. Office. Interop. Word. ApplicationClass" cannot be forcibly converted to the interface type "Microsoft. Office. Interop. Word. _ Application ". This operation fails because of the following error: An error occurred while loading the Type Library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY ))

This problem is that WPS has been installed before, and there is a residue during uninstallation, and there is a conflict with Microsoft Office (personal understanding ).

My personal solution is to re-download a relatively new WPS. After the re-installation, I found that the problem was solved magically. Unexpectedly, I cannot figure out why.

Solutions provided by netizens:

1,

There is no corresponding item under TypeLib on the machine, but there are the following items

HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ Interface \ {00020970-0000-0000-C000-000000000046} \ TypeLib?

The default key value points to {00020905-425-4b30-a977-d214852036ff}, which is a component of wps.

It seems that {00020905-0000-0000-C000-000000000046} should be changed to the word component of the office.

Similarly, 3.0 is changed to 8.3.

2,

In the end, when I was desperate, I tried to reinstall wps and try again. The result was really helpful. The uninstallation program that comes with wps is used. When I unmount the program, I noticed that there is a "Keep configuration information for ease of use next time". I directly checked this one and uninstalled it successfully, then I immediately debugged the program and never reported an error again. My head didn't hurt at once.

Conclusion: directly reinstall wps and uninstall it with the built-in uninstall program.

(I just tried to reinstall WPS and solve the problem)

3,

Open Registry Editor

Open the HKEY_CLASSES_ROOT \ TypeLib \ 00020970-0000-0000-C000-000000000046 \

Its subitem may be 8.x or 9.x. there are more than one subitem. This is the word version number, such

Delete a nonexistent or uninstalled object! Do not delete the error.

Finally, if the problem persists, reload the system. I also tried it that year. However, I had no choice but to reinstall the system.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.