tags:

views:

5799

answers:

12

Is there a way to export a simple html page to Word (.doc format, not .docx) without having Microsoft Word installed?

A: 

i believe open office can both open .html files and create .doc files

JimmyJ
A: 

Try some online tool like Zamzar

Niyaz
A: 

Well, there are many third party tools for this. I don't know if it gets any simpler than that.

Examples:

Also found a vbscribt, but I'm guessing that requires that you have word installed.

Microserf
A: 

Oh yes, open office can create .doc files

Microserf
+3  A: 

If you have only simple HTML pages as you said, it can be opened with Word.

Otherwise there are some libraries which can do this, but I don't have experience with them.

My last idea is that if you are using ASP.NET, try to add application/msword to the header and you can save it as a Word document (it won't be a real Word doc, only an HTML renamed to doc to be able to open).

Biri
A: 

I presume from the "C#" tag you wish to achieve this programmatically.

Try Aspose.Words for .NET.

Ian Nelson
+1  A: 

While it is possible to make a ".doc" Microsoft Word file, it would probably be easier and more portable to make a ".rtf" file.

Neall
A: 

If it's just HTML, all you need to do is change the extension to .doc and word will open it as if it's a word document. However, if there are images to include or javascript to run it can get a little more complicated.

Joel Coehoorn
+3  A: 

There's a tool called JODConverter which hooks into open office to expose it's file format converters, there's versions available as a webapp (sits in tomcat) which you post to and a command line tool. I've been firing html at it and converting to .doc and pdf succesfully it's in a fairly big project, haven't gone live yet but I think I'm going to be using it. http://sourceforge.net/projects/jodconverter/

Andrew Hancox
I didn't end up using it, it turned out that it leaked memory too badly for production use.
Andrew Hancox
A: 

We’re are using the SautinSoft's HTML -> Word library to convert some Html data to Word for compatibility with our application. Their component converted 6,136,940 database rows total in 3hrs 45mins, good show.

Tom Palla
A: 

This is the .Net component to convert HTML to RTF in C#, it names HTML-to-RTF Pro DLL .Net.

It works without having MS Office.

Code sample:

SautinSoft.HtmlToRtf.Converter obj = new SautinSoft.HtmlToRtf.Converter();
obj.PreseveImages = true; //images will be embedded in RTF document
obj.ConvertFile(@"d:\Web.htm", @"d:\Web.rtf");
Maximus
A: 

*SautinSoft.HtmlToRtf.Converter obj = new SautinSoft.HtmlToRtf.Converter(); obj.PreseveImages = true; //images will be embedded in RTF document obj.ConvertFile(@"d:\Web.htm", @"d:\Web.rtf");*

pankaj raj patel