?
Solved

Word automation (Word.ApplicationClass, TYPE_E_LIB_NOTREGISTERED)

Posted on 2007-12-07
4
Medium Priority
?
2,187 Views
Last Modified: 2010-05-18
Hi!

I have an .NET app on many machines at customer's office. App is doing some word automation (opening a document and doing a search replacing on some keywords).

Recently one machine was completelly reinstalled with Word 2003 SP3, Windows XP (all updates).

Now I get this exception:

System.InvalidCastException: Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because QueryInterface call on the COM component for the interface with IID '{...}' failed due to the following error: Library not registered (Exception from HRESULT: 0x8002801D (TYPE_E_LIB_NOTREGISTERED))

at this line in code:

Word.ApplicationClass WordApp = new Word.ApplicationClass();


I tried to change that to:
Word._Application WordApp = new Word.ApplicationClass();

but of course that didn't work..

Please help !
0
Comment
Question by:davidhq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:davidhq
ID: 20426088
additional info:

I see "Office 2007 primary interop assemblies" under Add/Remove programs.. this is strange, because the office installed is "Microsoft Office Professional Edition 2003"

thanx again
0
 

Accepted Solution

by:
davidhq earned 0 total points
ID: 20426105
hmm yes.. uninstalling PIA solved the issue!
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20776514
Closed, 0 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question