views:

64

answers:

2

Bill James wrote:

I was able to render an HTML page with the MIME type set to "application/msword", which caused the browser to spawn Word which imported the html just fine, allowing edits and saving just as if I'd output a real Word doc.

That sounds great to me, but I haven't been able to get it to work in any browser (Chrome/FF/Safari/Opera/IE on Win7 running Word 2010 beta). I tried changing the MIME type in the HTTP headers of several pages via Tamper Data to application/msword, and I tried using the http-equiv meta tag <meta http-equiv="Content-type" content="application/msword"> on a local HTML file I tried opening from the browser, but neither appeared to have any effect.

I don't really have a clue with regard to HTTP headers and MIME types generally, so - any tips? Many thanks!

A: 

Here's one of many lists of MIME types

http://filext.com/faq/office_mime_types.php

I tried changing the MIME type in the HTTP headers of several pages via Tamper Data to application/msword, ... neither appeared to have any effect.

Bummer that Tamper Data doesn't work as well as you'd like. Do you have access to an actual web server running an actual web application? Have you tried changing the HTTP response to change the headers?

S.Lott
A: 

It might well be that your user agent out-smarts you on that. Is it possible for you to rely on the file extension as well?

I implemented a related solution for Microsoft Excel, generating a HTML table but exposing it as a .xls file. Excel then complains about the mismatch between expected data format and the one it found, but at least Excel was opened.

Arne