How to convert HTML file to word?

html, ms-word

Solution

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

Problem

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.

Original source