I'm getting a bunch of .docs emailed to me which I'm writing a python script to extract the body and any .doc or .pdf as well as any message they may have sent and depending on the answer it may do more, and then I want to send it to my web server and have a php script format it for display.
I want to do any converting on my home pc because I don't have shell access to the web server and php is the only language supported which I (kind of) know. On the desktop I'm opened up to python, C, and C++ all of which I know better and are more suited for the job. I would really like to keep the formatting if possible, and I'm not trying to make a big project out of this so if it's too complicated I can always just upload the .doc and open it locally.
There are various Word to HTML converters - commercial and open source converters. The most common converter (open source) is likely "wv". You can also using Open-Office e.g. using the PyUNO bridge (requires a running OpenOffice server).  If you are on Windows there are various commercial solutions available re-using an installed Office installation. In general: Google yourself and choose a converter according to your needs and requirements.
Need an easy way to display a word document in html