Solved

Word automation (Word.ApplicationClass, TYPE_E_LIB_NOTREGISTERED)

Posted on 2007-12-07
4
2,184 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

707 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