A table in this document has become corrupted

Getting this message on an Aspose.Words v4.1 generated document. Apparently occurs when the original document is opened using Word 2000.

Can you please investigate?

Here’s an attachment of the same “document” without errors.

Hi,

Thanks for reporting this problem to us. We will research the issue. But please take into account that it is very hard to find what MS Word does not like in document. I would be very helpful if we could somehow find out what code causes the error to appear. Could you please attach some part of your document generation project sufficient to generate a problem document. It would help greatly in our research.

Best regards,

Take the non-error "okdoc" document I attached previously and open using Word 2002 or greater. It should be fine. Try opening the same docuent using Word 2000 (9.0.2720) and it should give you a corrupted table issue.

Quite possibly the tables generated using "InsertCell", "EndRow", and "EndTable" are compatible with Word 2002 and later, but somehow incompatible with 2000?

Ok, I have logged this to our defect base as issue #1467. We will research it soon, but it will still be helpful if you describe the process of the document generation for this case and attach some code snippets. I would also like to know why okdoc does not show error in MS Word 2003 and errordoc does. You have said that these documents are "same". But they are still different. Why?

Every bit of information that you can provide can help us to resolve the problem faster.

I've attached the class that handles our document generation. Tables are generated within different methods, so best to search for "InsertCell()".

This issue started to occur for us possibly during upgrading from the two versions. During that time, no code changes were made to the class.

When I open errordoc in Word 2000 I do get the "table corrupted" error. When I look under the error message box it is clear that the first table has a problem. So lets concentrate on the first table for now.

We will need your help to track the problem down because we have many tests for building tables dynamically like you do and none of the generated documents cause such errors.

We need your help because your code is quite complex, it will not run on our machines.

Basically, we need you to start "reducing" the code that builds the first table in your document until you reduce it to a point that it produces a valid document. In this the last reduction you made contained the code that was causing the problem. You report it to us and it will probably be possible to workaround while we also look at fixing it.

A bit more info what you need to do:

1. Your first table has a nested table. Comment out the code that creates a nested table. Generate the document, see if it opens in Word 2000 okay. If it is not, continue further.

2. You work with borders. Make sure you don't have zero width borders or stuff like that. We had problems with MS Word before on this and fixed, but maybe there are some other scenarios. Comment out all code that applies or modifies borders for the first table in the document. Generate the document, see if it opens in Word 2000 okay. If not, continue.

3. Reduce generated paragraphs to one paragraph per cell only. and so on and so on. until you end up with an empty table or no table at all in your code. By the way - no table will mean you will have no problem for sure :) Continue until you find the culprit and let us know.

Thanks. We’ll try this over the next week and will let you know.