0

Is it by anyway possible to convert HTML pages to word with some basic styling like tables , some colored headers, a few images ? I work with python . Are there any good libraries to mimic the representation as closely as possible ?

Deepankar Bajpeyi
  • 5,661
  • 11
  • 44
  • 64

1 Answers1

1

You'll need Python for Windows to do it this way, but I'd do it like this. That way you don't even have to convert it yourself.

import win32com.client as win32

ms_word = win32.Dispatch('Word.Application')
ms_doc  = ms_word.Documents.Add('your_website.html')

ms_doc.SaveAs('your_word_doc.doc')

ms_doc.Close()
ms_word.Quit()
Charles Clayton
  • 17,005
  • 11
  • 87
  • 120