Creating documents based on DOCX documents

we are using the latest version of Aspose.Words for .NET and we have following problem:

Our marketing department has created some templates in DOCX format. (25 pages long with embedded images etc.) In our application we have to merge the address data to this templates to create the final document.

We are using following code to load the template:
asDOC = new ASPOSE.Words.Document(MyTemplate, Aspose.Words.LoadFormat.Docx)

In some cases this line of code needs some seconds and in other cases up to 10 Minutes, depending on the DOCX template we are using.
We found out that this behaviour is because of some hidden informations inside the word document. If we delete this lines in the document and run the code again it is working fast.

Our problem is that we can’t identify the hidden information (it is different in every template). And it is too much work to check every template line by line.
Do you know this problem ? Could you help us ?

Hi
Thanks for your inquiry. Could you please attach sample document for testing? I will check it and provide you more information.
Best regards.

OK, here a test template …

The problem should be on page 2

Hi
Thank you for additional information. I managed to reproduce this problem and created new issue #5833 in our defect database. I will notify you as soon as it is fixed.
Best regards.

I am trying to fix this now.
Your document has over 3000! bookmarks in one position. These seem to be “unused” bookmarks that were generated by MS Word some time ago for a table of contents. They are hidden and probably of no use to you.
If you delete the bookmarks your document will load fast.
In the meantime we will fix the performance problem with loading so many bookmarks.
The best way to delete these bookmarks is to save the document as WordML and see in notepad where to bookmarks are and delete them.

The issues you have found earlier (filed as 5833) have been fixed in this update.