Error Combining Documents

I am combining 3 documents together and after the combination, when I open the document in Word, Word Locks up and starts eating 99% of my CPU.

I have attached the following documents:

Doc1.doc - First Document being combined
Doc2.doc - Second Document being combined
Doc3.doc - Third Document being combined
Final Doc.doc - The result of combining documents 1-3.

Doc1, Doc2, and Doc3 were all created when I took a word document opened it with Aspose and did some search and replaces.

Thanks,

John

The problem is caused by Doc3 document. It features heavy use of TextBoxes, some of them nested (check "By acceptance of this policy ..." paragraph), which Aspose.Words is not yet supporting in full. Try to reduce the number of textbox usage in your template documents, and especially avoid their nesting.

For example, if you remove the "By acceptance of this policy ..." paragraph altogether from Doc3 the final document starts to open ok after appending.

Vladimir,

We have about 1000 documents that we need to go through to see if this exists anywhere else. Is there a way we can programatically detect this using Aspose.Words?

Thanks,

John

(By the way, the question above was posted on my behalf, that is why I am following up to it.)

After taking a closer look at the documents, it doesn’t appear that they are embedded within eachother, it appears that they overlap (the overlap just appears as an embedding). Is that what is causing the problem?

If so, I might be able to write something that analyzes all of my documents.

Please let me some time for research, then I’ll be able to to give qualified answer.

This issue is in our defect base now. We will try to correct it in the next hotfix.

When textboxes just overlap, it does not cause problems in Aspose.Words. Only grouped textboxes is a problem at the moment.

Doc3.doc as it stands appears somewhat corrupted, I can get MS Word crashing just by opening it and deleting textboxes one by one. After I delete 3-4 textboxes, it crashes.

You said that you got this document produced by Aspose.Words after replacing some text in it. If this is the case, then I think its Aspose.Words that corrupted the document in the first place.

To be able to fix this, it will help if I can get the "original" Doc3.doc before it was an any way modified by Aspose.Words. Can you get that document for me please?

Using the latest Aspose.Words 3.6 the resulting document is valid and does not crash MS Word.