Doing a 'good' conversion of a .
doc file into HTML is a pretty tall order considering how many different things you can put in a .doc file.
You might look into the possibility of using openoffice programmiticaly to do the conversion. Their development page is
here. On the right of that page under the 'By Task' header is a link called 'Extend and Integrate'.
I don't actually know if this will work, but I don't know of another solution.