Backtrack:  
 
by lunarg on October 13th 2011, at 14:34

The problem is related to incorrect hinting of the webserver, tricking IE7/8 into believing you are in fact downloading a ZIP-file, rather than an Office 2007/2010 file. The reason for this is because these files are in fact XML-files, compressed to a ZIP, but have a different extension, indicating it's not a regular ZIP-file.

There are two ways to fix this. The best way would be to change the webserver (if possible, ask the administrator of the webserver you are downloading from) to add the correct MIME-types, so the webserver provides correct hinting. How this is done, depends largely on which webserver is being used.

When using Apache2, there are two ways to resolve the issue. Either add this in the website configuration, either by editing the config files or by creating an .htaccess file with the following contents:

AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

If you're running linux, you can also add the following to the /etc/mime.types file.

application/vnd.ms-word.document.macroEnabled.12				docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document				docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template				dotx
application/vnd.ms-powerpoint.template.macroEnabled.12				potm
application/vnd.openxmlformats-officedocument.presentationml.template				potx
application/vnd.ms-powerpoint.addin.macroEnabled.12				ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12				ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow				ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12				pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation				pptx
application/vnd.ms-excel.addin.macroEnabled.12				xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12				xlsb
application/vnd.ms-excel.sheet.macroEnabled.12				xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet				xlsx
application/vnd.ms-excel.template.macroEnabled.12				xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template				xltx

Client-side

If you are unable to change the webserver's settings, you can tell IE7/8 to ignore the hinting by changing a value in the security settings for Internet zone (Internet Options, Security, select Internet, hit Custom button).

Set the option Open files based on content, not file extension to disabled.

 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« Debating Windows vs. Linux vs. Mac is pointless: they all have their merits and flaws, and it ultimately comes to down to personal preference. »
Me