How to convert HTML file to word?

Mask picture Mask · Oct 26, 2009 · Viewed 159.1k times · Source

I need to save HTML documents in memory as Word .DOC files.

Can anybody give me some links to both closed and open source libraries that I can use to do this?

Also, I should edit this question to add the language I'm using in order to narrow down the choices.

Answer

Jan picture Jan · Apr 7, 2014

Try using pandoc

pandoc -f html -t docx -o output.docx input.html

If the input or output format is not specified explicitly, pandoc will attempt to guess it from the extensions of the input and output filenames.
— pandoc manual

So you can even use

pandoc -o output.docx input.html