Office Open XML file .docx cannot be opened

Discussion in 'Microsoft Word Document Management' started by CyberTaz, Jan 12, 2009.

  1. CyberTaz

    CyberTaz Guest

    Not knowing what version of Word (2007?... earlier version with converters?)
    or which version of Windows (XP, Vista?) it's hard to offer specifics, but
    have you tried the Open & Repair option?
     
    CyberTaz, Jan 12, 2009
    #1
    1. Advertisements

  2. CyberTaz

    Aldon Guest

    I am receiving an error when trying to reopen a document. The error is
    listed below.
    The Office Open XML file "FileName".docx cannot be opened because there are
    problems with the contents.
    Details
    Unspecified error
    Location: Part: /word/document.xml, Line: 2, Column: 11179
     
    Aldon, Jan 12, 2009
    #2
    1. Advertisements

  3. CyberTaz

    p0 Guest

    Sounds like the xml parser is having some issues with something in
    your document. Without any details, its hard to tell what it is. And
    unless someone else can prove me wrong, the only solution is probably
    unzipping the docx and hunting the issue down manually in
    document.xml.

    Yves
     
    p0, Jan 12, 2009
    #3
  4. CyberTaz

    Aldon Guest

    I have Win XP and am using Word 2007. I created the template using 03 and
    had to recreate the template when we switched to 07. I have that template
    saved and create documents based on that template. Once the document is
    typed, saved, and closed this error comes up when I try to open the document.
    We have been using this template for nearly a year without any problems. I
    first experienced the problem and now other people in the office are getting
    the same errors. I have the template organized in Word tables with form
    fields that have macros in certain fields to check spelling. I am not sure
    of the "open and repair" option. I am not prompted to do this and am not
    familiar with it.
    Thanks,
    Aldon
     
    Aldon, Jan 12, 2009
    #4
  5. CyberTaz

    Aldon Guest

    Thanks for that bit of information however the file still will not open. It
    still provides me the same error.
    Aldon

     
    Aldon, Jan 12, 2009
    #5
  6. CyberTaz

    addpoint

    Joined:
    Mar 25, 2009
    Likes Received:
    0
    Content Control problem

    I have experienced this error and was able to get rid of it, when I discovered that a Content Control had snuck itself inside another control, and deleted it!
     
    addpoint, Mar 25, 2009
    #6
  7. CyberTaz

    chrima

    Joined:
    Aug 18, 2009
    Likes Received:
    0
    The real error which prevents Word from opening the file is not at the place that it displays (its Unspecified Error, just close to a </w:tbl> ending tag). An error often occures when a field is included in another field. An content control, an index field for example, may have been manually or automatically inserted in the Table of Contents, which is also a field.
    This is a bug of Word which is today seemingly not corrected.

    In the case when the problem is due to one or more fields inserted in the table of contents :

    Let us assume that the doc is named MYDOC.docx for example.
    1. Rename MYDOC.docx to MYDOC.zip
    2. Unzip MYDOC.zip to the MYDOC/ folder
    3. In MYDOC/word/, there is a file named document.xml
    4. Open document.xml in Notepad++ (for example)
    5. Go to the place where the Table of Content begins, by looking for the pair of tags <w:fldChar w:fldCharType="begin"/> ... TOC ... <w:fldChar w:fldCharType="end"/> which contains a TOC field inside.
    6. Look for " XE " without quotes after that (maybe without spaces), quickly verify that we still are in the table of content.
    7. Look for the surrounding tags w:fldChar which encloses this " XE " : <w:fldChar w:fldCharType="begin"/> ... XE ... <w:fldChar w:fldCharType="end"/>
    8. Delete those two tags and the inner content (we just deleted the bad index entry)
    9. If there are more (in the case when it was automatic for example), just repeat steps 6 to 8, until we are no more in the table of contents.
    10. Once it's done, zip the folder MYDOC/ to MYDOC_REPAIRED.zip (for example)
    11. Rename MYDOC_REPAIRED.zip to MYDOC_REPAIRED.docx (facultative step)
    12. Open this last file with word, and hope that it was the only error :)

    Cordially yours,
    The programming assistant of Upbraining.net
     
    chrima, Aug 18, 2009
    #7
  8. CyberTaz

    Big Mike

    Joined:
    Mar 12, 2010
    Likes Received:
    0
    Has a Better Fix Been Found?

    I received the error this morning. Yesterday, I added both TOC and Index to my document and started marking index entries. One entry didn't get the entire word. I could't find a way to remove it and tried just deleting the entry in the text. This may have caused the error. I'm getting yesterday's file recovered from the backup, so I've just lost a day's work.

    I tried the fix posted in the previous entry and used both Notepad and the IE XML editor to view document.xml, but found too many entries to fix it manually. Surely, MS has a fix utility available for this. If anyone knows please post it.
    Thanks
     
    Big Mike, Mar 12, 2010
    #8
  9. CyberTaz

    Ben3DX

    Joined:
    Oct 10, 2010
    Likes Received:
    0
    script fix for word docx XE issue

    Well it really annoys me that ms hasn't put a fix for this out.

    I lost a whole days work because I added index identifiers..and found out that I couldnt' open it anymore...after ages of trying to fix it in notepad, I in the end wrote a script which stripped out the XE tags and created a new document.xml...re-zipped it and it seemed to work okay.


    Just incase anyone is interested the python script is here:

    fromfile = "document.xml"
    tofile = "document2.xml"


    fp = open(fromfile, 'r', encoding="utf8")
    mystr = fp.read()
    fp.close()

    startstr = """<w:fldChar w:fldCharType="begin"/>"""
    endstr = """<w:fldChar w:fldCharType="end"/>"""
    containsstr = """ XE """

    found = mystr.find(" TOC ")
    found = mystr.find(startstr, found)
    while (found>-1):
    end = mystr.find(endstr, found) + len(endstr)
    piece = mystr[found:end]

    if containsstr in piece:
    mystr = mystr[:found] + mystr[end:]
    found = mystr.find(startstr)
    else:
    found = mystr.find(startstr, found+1)

    fp = open(tofile, 'w', encoding="utf8")
    fp.write(mystr)
    fp.close()
     
    Ben3DX, Oct 10, 2010
    #9
  10. CyberTaz

    bubbly9852

    Joined:
    Apr 25, 2011
    Likes Received:
    0
    Hello Kim

    I have the error message when I try to open my maths degree assignment The file cannot be opened because there are problems with the contents. unspecified error Locatin:part/word/document.xml, Line:2, column:0. I have imported the file but I do not know what to do next. My graphs are all missing which i did in excel. It looks such a mess and it has to be in by Wednesday

    Thanks in advance
    pamela
     
    bubbly9852, Apr 25, 2011
    #10
  11. CyberTaz

    awaleed

    Joined:
    Dec 3, 2011
    Likes Received:
    0
    Dear chrima
    You saved my day, I really thankful to you, I was doing my toughest assignment in MS word 2007, and could not made any of the backup, a work of 7 days crashed in a moment. and I was getting the same error.
    Unspecified error
    Location: Part: /word/document.xml, Line: 2, Column: *******

    I start searching on net, fortunately Google took me this forum, and I saw your post, I tried it and it really worked.

    Ahmed, UAE.
     
    awaleed, Dec 3, 2011
    #11
  12. CyberTaz

    bccoach

    Joined:
    Dec 11, 2011
    Likes Received:
    0
    I faced the similar problem today and in a desperate attempt to recover my long worked document, I did the following:
    I instlalled open office and the xml corrupted document of MSOffice opened fine. I took the back up of my contents of the document. so try opening your error showing document in open office. It might work. what MS doesnt do, Open office does. Though I don't suggest this a solution, it is handy.:thumb:
    bccoach
     
    bccoach, Dec 11, 2011
    #12
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.