Joining documents throws exception using .NET | AppendDocument

Hi

I have a problem with saving documents using Aspose.Words 11.2.0.0. My setup is as follows:

Previously i have documents being merged by Aspose.Words, these documents are then placed in folders. These merged documents need to be merged into one continous document. This continous document has a front page, that is mailmerged depending on data in the merged documents. I can merge documents that have not been previously merged just fine.

After i have merged two documents with a particular type of mergefield and i call save() using the .docx type, the Aspose.Words dll crashes with this exception:

Item has already been added. Key in dictionary: 'Date' Key being added: 'Date'Item has already been added. Key in dictionary: 'Date' Key being added: 'Date'

Stacktrace:

at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at x53eb9320ebbb8395.x2f5330e0b9089bce.xc448fbc8a6be9ef9(BuildingBlock x37f3a555926e71c4)
at x53eb9320ebbb8395.x2f5330e0b9089bce.xd157f58df9dc3948()
at x53eb9320ebbb8395.x2f5330e0b9089bce..ctor(DocumentBase doc)
at Aspose.Words.DocumentBase.get_x2f5330e0b9089bce()
at x13cd31bb39e0b7ea.xcc0b5baa75272714.VisitGlossaryDocumentStart(GlossaryDocument glossary)
at Aspose.Words.BuildingBlocks.GlossaryDocument.x2449520719b1e37e(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.BuildingBlocks.GlossaryDocument.Accept(DocumentVisitor visitor)
at x13cd31bb39e0b7ea.xcc0b5baa75272714.x18dfca7c5fd2402f(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
at Aspose.Words.Document.Save(String fileName)
at BatchPrinter.BatchForPrint.PrintBatches(String skabelonDirectory, List`1 printBatches) in C:\DSA.Kode\Netcompany.Crm\src\BatchPrinter\BatchForPrint.cs:line 180 at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at x53eb9320ebbb8395.x2f5330e0b9089bce.xc448fbc8a6be9ef9(BuildingBlock x37f3a555926e71c4)
at x53eb9320ebbb8395.x2f5330e0b9089bce.xd157f58df9dc3948()
at x53eb9320ebbb8395.x2f5330e0b9089bce..ctor(DocumentBase doc)
at Aspose.Words.DocumentBase.get_x2f5330e0b9089bce()
at x13cd31bb39e0b7ea.xcc0b5baa75272714.VisitGlossaryDocumentStart(GlossaryDocument glossary)
at Aspose.Words.BuildingBlocks.GlossaryDocument.x2449520719b1e37e(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.BuildingBlocks.GlossaryDocument.Accept(DocumentVisitor visitor)
at x13cd31bb39e0b7ea.xcc0b5baa75272714.x18dfca7c5fd2402f(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
at Aspose.Words.Document.Save(String fileName)
at BatchPrinter.BatchForPrint.PrintBatches(String skabelonDirectory, List`1 printBatches) in C:\DSA.Kode\Netcompany.Crm\src\BatchPrinter\BatchForPrint.cs:line 180

I have enclosed the two files that crashes the program (cut down to minimum for ease). I have also tried saving the file as .pdf, but then the mailmerge is not performed on the frontpage.

@mbn

Thanks for your query. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-6708 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-6708) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.