
Mit der Veröffentlichung von Office 2007 hatte Microsoft neue Dokumentenformate, basierend auf XML, vorgestellt. Diese Typen tragen die Endung docx für Microsoft Word oder auch xlsx für Microsoft Excel. Soviel zur sehr kurzen Einführung.
In unserem Intranet haben wir einige Dokumente die Mitarbeiter herunterladen können. Der Standardbrowser ist bei uns der “beliebte” Internet Explorer. Wird nun ein zB ein docx Dokument heruntergeladen, schlägt das Betriebssystem, in unserem Fall Windows, vor diese via WinZip (kann natürlich auch ein anderes Programm sein) zu öffnen.
Im Grunde ist es gar nicht mal so falsch, denn diese Typen sind eigentlich Zip Container, welche zig verschiedene XML Dateien beinhalten.
Auf alle Fälle möchten wir trotzdem, dass das Word Dokument auch mit Word 2010 geöffnet wird.
Das Problem liegt am Webserver und den definierten Mime-Types. Es gibt nun drei Möglichkeiten ein dieses Problem zu beheben
- editieren der /etc/mime.types
- editieren der .htaccess
- ändern eines Reg. Schlüssels unter Windows
Das Ändern der Registry unter Windows empfinde ich als falschen Lösungsweg, ich möchte ihn allerdings nicht vorenthalten.
/etc/mime.types ändern
Unter Debian (wird bei andern Unix Betreibsystemen ähnlich sein) befindet sich im Verzeichnis /etc die Datei mime.types. Diese beinhaltet alle möglichen Mime Types. Um nun dem Webserver mitzuteilen das es sich bei docx, xlsx, … um Office Dateien handelt muss diese mit folgenden Werten editiert werden.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<code> 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 </code> |
Anschließend müsst ihr den Apache neu starten und das Problem sollte gelöst sein.
.htaccess ändern
Solltet ihr diese Datei nicht ändern dürfen (Shared Hosting), könnt ihr die MIME Types auch in die .htaccess eintragen, dies würde dann so aussehen:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<code> 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 </code> |
Registry Key ändern
Wie bereits oben erwähnt ginge es auch dem Client beizubringen, dass es sich um ein Office Dokument handelt. Hierfür müsst ihr folgenden Reg. Key ändern:
|
|
<code> HKLM\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_MIME_HANDLING - iexplorer.exe DWORD=0 </code> |
Ich würde euch diese Methode nicht empfehlen. Anwendung auf eigene Gefahr.
Ähnliche Beiträge