Skip Ribbon Commands
Skip to main content

Ben There, Done That

:

SharePoint Ben > Ben There, Done That > Posts > Testing .docx file uploads with SharePoint
March 26
Testing .docx file uploads with SharePoint

I had a client email me with an interesting dilemma a couple days ago.  He was working with a document library and uploading .docx files.  He was creating a group of Office 2007 files and Office 2003 files and uploading multiple files at once.  He emailed me saying that all the files were uploading but .docx files.  Sure enough, they weren’t uploading and no errors were being generated.

He emailed me a screenshot of the upload, and I noticed something strange.  The size of the Word document was 0 K.  I created my own blank Word document, saved it and uploaded it and it was 10 K.  Curious about the difference, I thought he had a corrupted or “bad” Word file.  Nope, it open just fine in Word, but was still 0 K.

Come to find out, he was right clicking on his desktop and selecting “New Microsoft Word Document”  I was going into Word and saving the open file.  The file created by right clicking on the desktop, is a valid Word file, but is missing some key info that was causing the upload to fail.

If you open a .docx file in WinRAR or WinZip, you’ll notice it is actually a collection of folders and XML files.  When saving a blank Word file from within Office, there are some default XML files that are created and added, however, when you create the file by right clicking your desktop, none of those XML files are created.  If you try to open such a file in WinRAR you get an invalid archive error as opposed to the folder and file structure you usually see within a .docx file.

The lesson, if you’re going to do testing with a blank Word document, create it from within Word and not by right clicking on your desktop.

 

 Comments

 
 
 
 
 
 
 
 
 
 
 

Glad you liked it. Would you like to share?

Sharing this page …

Thanks! Close

Add New Comment

 

Showing 0 comments

    Trackback URL
     
    blog comments powered by Disqus
     

     Pre-Disqus Integration Comments

     

    Comments

    Testing .docx file uploads with SharePoint

    Came across this looking for answers to a different issue I'm having with .docx vs. .doc files. I'm using content types (perhaps incorrectly or not needed) and there is a yes/no property that does not save if the document is .docx, but does if it's .doc. I've tried setting a .dotx template for the content type (vs. the basic .doc)but nothing's working. Suggestions? Thanks.
    Benjamin.SteginkNo presence information on 3/17/2011 3:24 PM