How do I figure out why this docx file is bad?

J

Jialiang Ge [MSFT]

Hello Dave,

This a quick note to let you know that I am performing research on this
issue. It is uneasy to identify the exact reason of the error. I have spent
four hours on testing your docx file, but still cannot find out the
resolution. I will continue testing and let you know the result as soon as
possible. What I did for testing include:
1. Open the bad docx, let Word 2007 repair the document and save as a new
docx.
2. Compare the two docx's xmls: Replace each bad docx's xml with the new
one, and see if the docx can be fixed.
3. Carefully check each rId.

I have also sent an email to the product team to see if they have any
comments.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Tony Jollans

Firstly let me agree with you that the message from Word isn't very helpful,

Next, there is something that strikes me as decidedly odd about the zip
file, but it may simply be a lack of knowledge on my part. If I delete files
within the zip and close it and re-open it, I find they are still there. If
I extract, for example, document.xml.rels from the word\_rels folder, edit
it and replace it then I end up with two copies of the 'file'.

After that it gets wierder. I created a new package with all the same
components and I made a simple change - I changed the name of "Blue
hills.jpg" to "Bluehills.jpg" - the name of the jpeg, and references to it
in the three _rels files in word\_rels and also the (three) references to it
in word\document.xml. I could then open the file with Word - just don't ask
me why!
 
D

David Thielen

Hi;

Ok, I've done some testing - both DOCX and XLSX require that bitmap files in
the zip have no spaces. Can you please get the Office group to update the
OpenXML docs immediately as this is something everyone will trip over.

Also, can you ask them to give a better error message in this case?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,

Below is the response from the Word product team:

"With some errors, you will get a location in the XML or a specific error
message to help you. However, as you have seen, there are many give you a
generic error with no location. The best way to track these down by
narrowing down the file. Remove parts, including their relationships and
all references to those parts and relationships. Once you get it narrowed
down which part the error is in, then start whittling down that XML file by
a rudimentary binary search. For instance, if it's document.xml, remove
half of the content, and see if the error reproduces. If it does, then
remove half of the remaining content and check for that error. If the error
goes away, then try the half you removed. Keep repeating until you've
narrowed it down to a specific chunk of XML. Then look carefully at that
XML to identify the problems. Try validating against the schemas for
obvious errors. You can target this search if you know what parts of the
file were not written by a copy of Word (what did you or your application
change after Word last saved the file). Of course if the entire file was
created outside of Word and has never been saved in Word, then this will
not help.

Unfortunately, I know of no tools to help out with this. This is the same
basic pattern we (the Word product team) use to determine why a file has
errors when we're not able to attach a debugger with symbols."

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top