Convert your doc files to pdf with the help of JOdConverter and OpenOffice
See How to convert ppt to images in Ruby? for reference
and then use pdftohtml (http://pdftohtml.sourceforge.net) a utility which converts PDF files into HTML.
You will get amazing results.