We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Merge regions not working with Aspose.Words for .Net on v9.1.0.0 of dll

Hi

I had some mailmerge word docx documents that reference regions, i.e.

«TableStart:CaseDetails»<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Date:

«InstructionReceived»

Our Ref:

«PMGCaseRef»

«TableEnd:CaseDetails»

The source data is supplied via XML.

<Instruction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

.

.

<CaseDetails>

<CaseID>cdb17b61-4d76-df11-9359-00237d5782f6</CaseID>

<PMGCaseRef>PMG10000624/101</PMGCaseRef>

<InstructionReceived>2010-06-12T19:06:31.766208+01:00</InstructionReceived>

.

.

</CaseDetails>

</Instruction>

This used to work fine for v8.1.0.0 of the Aspose.Words.dll but when I upgraded to v9.1.0.0 this stopped working. I have therefore had to revert back to the older version.

Hi

Thanks for your inquiry. Could you please attach your document and code here for testing? I will check the problem on my side and provide you more information.

Best regards,

Please find attached a zip file containing the documents (source xml file PortalInstruction.xml and word template AppointmentLetterTemplate.docx) and a Visual Studio 2008 solution containing a test forms application. The PDF generations works fine for v8.1.0.0 of the Aspose.Words.dll but not for v9.1.0.0.

Thanks

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. The reason of your problem, I think, is regions in your template. We use regions when we would like to repeat some information row by row. In your case it is enough to use simple mail merge as described here:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/simple-mail-merge-explained.html

So you should change your template in order to use simple mail merge, and I think your problem disappears.

Best regards,