Link to home
Start Free TrialLog in
Avatar of smnetserv
smnetserv

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Jammer59
Jammer59
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rclint
rclint

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.