[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Word automation (Word.ApplicationClass, TYPE_E_LIB_NOTREGISTERED)

Posted on 2007-12-07
4
Medium Priority
?
2,194 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 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