wordpress hit counter
Re: docx “File is corrupt” error in Word - WordprocessingML - Formats - OpenXML Developer

Re: docx “File is corrupt” error in Word

Formats

Discussions about working with different Open XML Formats

docx “File is corrupt” error in Word

  • rated by 0 users
  • This post has 1 Reply |
  • 0 Followers
  • I wrote a program, which open docx package and changes some (w:t)-text in "word/document.xml". When i open new generated docx in Microsoft word, it gives me an error — "file is corrupted". But if look in "Open XML SDK Tool" diffs between template docx and result docx files — there is only two line changed in "word/document.xml". Look at screenshot — http://img.skitch.com/20100823-1dxncq6fh33iew87wkdp63bbn4.png . Program doesn't touches document format, styles or smth. Only text in (w:t)

    So, what's can provoke "file is corrupted" error in Microsoft Word?

    And this error appears ONLY in Microsoft Word. For example OpenOffice and TextEdit on Mac OS X open generated files without any errors.

    I upload these docx files, so you can look at them by yourself — http://bit.ly/cPlTjd

    thanks.
  • the problem was in unix-style line endings in document.xml — Microsoft Word 2007 accept only "\r\n" line endings.
Page 1 of 1 (2 items)