InterOP. Word external component exception solved

Source: Internet
Author: User
Tags reflector

Http://www.cnblogs.com/hbb0b0/articles/1880490.html

System. runtime. interopservices. sehexception not processed
Message = "external component exception. "
Source = "InterOP. Word"
Errorcode =-2147467259
Stacktrace:
In word. Find. set_text (string prop)
In tpri. common. iolibrary. operatorword. replacetext (string replacetext, string valuetext) Location C: \ Documents ents and Settings \ LHB \ My Documents ents \ reflector \ disassembler \ tpri. common \ tpri \ common \ iolibrary \ operatorword. CS: Row 108
In leleapplication1.program. Main (string [] ARGs) Location C: \ Documents ents and Settings \ LHB \ My Documents ents \ reflector \ disassembler \ consoleapplication1 \ Program. CS: Row 17
In system. appdomain. _ nexecuteassembly (Assembly, string [] ARGs)
In system. appdomain. executeassembly (string assemblyfile, evidence assemblysecurity, string [] ARGs)
In Microsoft. visualstudio. hostingprocess. hostproc. runusersassembly ()
In system. Threading. threadhelper. threadstart_context (object state)
In system. Threading. executioncontext. Run (executioncontext, contextcallback callback, object state)
In system. Threading. threadhelper. threadstart ()
Innerexception:

The above error occurs when you call the word component.
Cause: the component library registered with word is damaged. You need to re-register the word component library.
Solution:
Then, use regtlib.exe with the full path of the Type Library in the command line to re-register the library with COM. Regtlib.exe calls the loadtypelib and registertypelib application interfaces (APIS) on the passed-in Type Library (. TLB or. olb) file ). Com will fix the incorrect registry key.

Regtlib.exe "C: \ Program Files \ Microsoft Office \ office12 \ MSWord. olb "(Note: English dual-index numbers are not single-index numbers. If regtlib.exe is not available, go to c: \ windows \ Microsoft. net \ framework \ v2.0.50727 \ regtlibv12.exe directory
Regtlibv12.exe "C: \ Program Files \ Microsoft Office \ office12 \ MSWord. olb". regtlibv12.exe is upgraded to regtlib.exe

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.