Solved

Convert .doc to plain text file and later without having word installed

Posted on 2008-10-03
5
617 Views
Last Modified: 2011-10-03
How can I convert a .doc file(ms word or open office writer) to only plain text file using C#.
I have first used Microsoft.Office.Interop.Word.dll and it work fine on my computer.Then when i moved the webapp to the server I got the message:
 Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
because in that server i do dont have ms word installation.
Plz give the solution asap.

Thanks,
Vimal
0
Comment
Question by:smnetserv
5 Comments
 
LVL 6

Accepted Solution

by:
Jammer59 earned 63 total points
Comment Utility
Have you installed Microsoft.Office.Interop.Word.dll on the server and registered it?
This article from Microsoft explains - Installing and Using the Office 2003 Primary Interop Assemblies   - http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx
You may also run into issues on the server where your web application does not have rights to the dll.  You may have to review IWAM_<machine_name> and IUSR_<machine_name> rights to the dll.
 
 
0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 62 total points
Comment Utility
0
 
LVL 1

Expert Comment

by:rclint
Comment Utility
I didn't verify this but I have had some success by copying the dll containing the code I want to use to the web directory.  Sometimes just having the dll there and linked to will provide the functions you want without installing anything to the server.  This does have the downside that if the dll is ever updated then you will be using an older dll.  In my cases it didn't matter because I was only using one or two functions anyway.
0

Featured Post

A Knowledge Base That Stays Up-to-Date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
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.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now