I'm in need for saving a Word document as HTML. It has some background images, other images, texts, ... It opens correctly in Internet Explorer, but how can I save a word doc as HTML so that Firefox and other current browsers render it correctly?

All images are missing in the document. I looked through the generated html document, but the paths for the images appear to be correct.

Any idea?

Things like "Don't save docs as html" won't be helpful here.

Edit: To make myself clear, the normal "Save as HTML" doesn't cut it, the result is broken in any browser other than Internet Explorer.

Edit 2: What I'm using is Word 2010 and Firefox 4. I also tried rendering it in the latest Chrome version, which failed as well. I used different compatibility settings for saving as html, it did not help

link|improve this question

1  
Can you please provide a screenshot (or partial screenshot) showing us in what what way it fails? – Majenko Apr 9 '11 at 13:02
Not of that particular document, I'll describe, if not enough I'll create something new. I have a word doc with background image over the entire page, I have other images at various locations, and I have formatted text on the page. The resulting HTML is a white background, no images, just the formatted text. – private_meta Apr 9 '11 at 13:05
using word for html is a horrible idea in general. I'm curious to how uploading it to google docs and using its html output function, or usign OOo/libreoffice to export would work tho – Journeyman Geek Apr 9 '11 at 13:21
Can't help about the Word doc itself. Google Docs shows the image, but destroys the entire format even more than Word Export does. I didn't try OOo yet, don't have it installed right now – private_meta Apr 9 '11 at 13:27
Just tested in Open Office (3.2.*). It looks ok in Open Office Writer, but breaks when viewed in a browser – private_meta Apr 9 '11 at 13:53
show 1 more comment
feedback

3 Answers

I encountered the same issue. It seems that for some reasons Word does export regular HTML for some documents.

Usually Word exports graphics with two codes: a special one for rendering in IE, and regular HTML for the other browsers.

The code looks like below (I removed a lot of the code for readability)

<p ...><span ...><!--[if gte vml 1]><v:shapetype...>
 [code for IE]
</v:shapetype>
<v:shape id="Picture_x0020_2" ... alt="...png" ...>
 <v:imagedata src="...docx_files/image001.png".../>
</v:shape><![endif]-->
<![if !vml]><img width=169 height=119
src="..."... ><![endif]></span></p>

Notice the conditional?

<!--[if gte vml 1]> IE Code <![endif]--> <![if !vml]> Non IE HTML <![endif]>

For some documents I see that Word stops being bilingual and exports only the IE part.

I do not have the solution for these cases yet. Still investigating

link|improve this answer
feedback
up vote 0 down vote accepted

As apparently nothing else worked, it became one of these damn "IE only" solutions.

link|improve this answer
feedback

In Word, in the Save As dialog, in the Save as type: list, select Web Page (*.htm; *.html).

link|improve this answer
Not like I wouldn't have tried that. This way, it doesn't render properly in any browser other than Internet Explorer – private_meta Apr 9 '11 at 12:24
It works for me. You should be nicer if you want help. – Geoffrey van Wyk Apr 9 '11 at 12:29
What version of Microsoft Word and Firefox did you try it with? Did you use images in there? – private_meta Apr 9 '11 at 12:34
Word 2007, Firefox 4. I inserted a GIF image and could see it in the browser. – Geoffrey van Wyk Apr 9 '11 at 12:40
Doesn't work with Word 2010, neither with a JPG nor a GIF. I stored those files as doc and not docx, so there shouldn't be any incompatible tags in there either. – private_meta Apr 9 '11 at 12:47
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.