www.webdeveloper.com
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31

Thread: Is your docx file turning into a zip? - SOLUTION

  1. #16
    Join Date
    Feb 2010
    Posts
    1

    simplify please

    I've been having the same problem with .docx files attached to emails and being saved as un-openable zip files. I am absolutely not computer-savvy. I use IE8 and Windows 7. Please explain this fix in a way I could follow - or suggest a site that would have it. This would save a lot of grief. thanks very much

  2. #17
    Join Date
    Feb 2010
    Posts
    1
    Hi Sam,
    i am facing the same problem in CFML. i am able to upload office 2007 file but for download when i click on hyperlink in IE it opens a zip file with lots of xml files. i thing i noticed is that when i mouse over the link it shows file name with proper extension (docx or xlsx).

    is your problem resolved? plz let me know if u hav any idea?

    -Sachin

  3. #18
    Join Date
    Feb 2010
    Posts
    1
    Just had a customer with this problem of not being able to download .xlsx and .pptx files from webmail the correct way. They were downloading as .zip. He was able to download .docx though. Tested his web account on my computer and it worked for me to download his attachments from his email.

    So since it did not seem to be a server problem in this situation I tried to find the differences on the computers. He was running IE8 and I was running IE7 both on Windows XP.

    After uninstalling the IE8 upgrade from his computer he was able to download the attachments the right way.

  4. #19
    Join Date
    Feb 2010
    Posts
    1
    I have been experiencing the same issue when downloading docx files with Internet Explorer and getting zip files.
    Does anyone know if there is an article from Microsoft documenting this issue or if they are going to fix it?

    Thanks!

  5. #20
    Join Date
    Feb 2010
    Posts
    1

    Line 1 correction

    Line 1 in the code should be?
    AddType application/vnd.ms-word.document.macroEnabled.12 docm
    with no . in front of the file extension name
    This code also worked for me...Thank you very much!

    Quote Originally Posted by mcupples View Post
    So yeah, to make this work in apache, throw up a file called .htaccess in the web root of whatever site you want to change and throw this crap in it:

    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
    and it'll work. thanks to the op! been looking for that for a while!

  6. #21
    Join Date
    Mar 2010
    Posts
    1
    Quote Originally Posted by DustDevil1980 View Post
    For apache2:

    /etc/mime.types

    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
    For Apache2.2 users still having issues after adding the mime types listed above, read on.

    We're running Apache2.2 on Windows Server 2003. Most users are using IE v6+. The IE users were having the same problems with a new .pptx file.

    When I checked conf/mime.types, the mime types were already in the file. However, I saw that the "application/vnd.ms-powerpoint" entry only contained the ppt, pps, and pot extensions. Adding the pptx extension fixed the problem.

    To avoid future problems with other Office file types, I modified the following conf/mime.types entries as follows:

    Code:
    application/msword	       doc docx dot dotx
    application/vnd.ms-excel       xls xlsx xlm xla xlc xlt xltx xlw
    application/vnd.ms-powerpoint  ppt pptx pps ppsx pot potx potx sldx

  7. #22
    Join Date
    Mar 2010
    Posts
    1

    for those who aren't tech savvy

    if you save the docx document as a zip file and then change the extension from .zip to .docx it magically turns it into a word document; to change the file extension, you have to go into control panel and folder options and uncheck the box that says hide extensions

  8. #23
    Join Date
    May 2010
    Posts
    1

    Thanks for the help!

    Thanks for the tip, this was very helpful. By the way I placed these apache mime types directly in the mime.types file for Apache config and worked just as well (Removed the add statement word at the front).

  9. #24
    Join Date
    Jun 2010
    Posts
    1

    OpenCart

    I am new to programming and having somewhat similar problem. I am using Opencart ecommerce for selling documents. However, there is a problem. When customer purchases documents which can be doc, docx, ppt, pptx, xls, xlsx, zip, rar etc. The problem is that whenever they are clicked to download "application/octet-stream" pops up to save whether it is doc or docx or even zip!!! However this issue is only with Mozilla as everything works fine in Chrome and IE. Anyone can help me here!!!

  10. #25
    Join Date
    Jun 2010
    Posts
    1

    Mime types

    Hi there

    I have mentioned the mime type in my apache under /etc/mime.types
    still it did not work as expected

    Interestingly it works in some of the IE8 browsers but not all

    Does the order matters in /etc/mime.types ?

    And IE8 with windows 7 OS, the docx opens with type as XML ..

    Any suggestions

  11. #26
    Join Date
    Nov 2010
    Posts
    1

    Hi there

    I had this problem, my aplication was made on java and the web server was jetty, but i think that with this solution it doent mater about the web server, the only thing that you hava to do is add this lines on your web.xml :


    <mime-mapping>
    <extension>docx</extension>
    <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
    </mime-mapping>

    <mime-mapping>
    <extension>xlsx</extension>
    <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
    </mime-mapping>

    I hope this help us, because i was searching for this solution.

  12. #27
    Join Date
    Dec 2010
    Location
    Ann Arbor
    Posts
    1
    Thanks mcupples. This worked for me on Oracle Application Server.

  13. #28
    Join Date
    Jan 2011
    Posts
    1
    THANKS to Discorax and MCupples for starting and adding to this post. It was great to find a solution to such a weird problem.

  14. #29
    Join Date
    Jan 2012
    Posts
    1

    Thumbs up Thanks!

    Thanks Bradclif et al. That worked a charm!

  15. #30
    Join Date
    Apr 2012
    Posts
    1
    docx opens as zip using ie8 - Just change the extension of .zip to the appropriate ms-office doc extension(for example ....change .zip to .docx) shall work.

    Control Panel -> Tools -> Folder Options -> View -> uncheck "Hide extensions of known file types".

    This shall work for all MS-Office docs.

Thread Information

Users Browsing this Thread

There are currently 17 users browsing this thread. (0 members and 17 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles