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

Free Support Forum - aspose.com

Nested Merge Field inside INCLUDETEXT Field & Insert Text from File in Word Document C# .NET

Hello,

We recently upgraded Aspose.Words to version 19.8 and started to have an issue when doing a mailmerge.

This mailmerge has INCLUDETEXT where it’s pulling the information from a web page.

First, the mailmerge was not finishing and just hangs consuming all CPU of the server.
Template reference: “mailmerge does not finish.doc”

After slightly modifying the template, the mailmerge finishes but not display correctly the tables information.
Template reference: “mailmerge finish but not display correctly.doc”
File generated: “result.pdf”

The merge fields values used were:
ProjectCustom_ProjectNumber: 201018
ProcessFields_BidPackageNumber: 03

URL generated:
http://appls.sucf.suny.edu/portal/proj/proj/utilities/phaseapprovalfees.cfm?Projectnumber=201018&bidpackage=03&approvedphase=Construction%20Administration

Please, let me know if you need anything else to find the root cause of this issue.

Zip with the 3 files mentioned in the description:
includetext issue.zip (713.3 KB)

Ruben Lerma
e-Builder, Inc.

@rltejada,

We have generated an output PDF from “mailmerge finish but not display correctly.doc” by using the following simple code:

C# .NET Code:

Document doc = new Document("E:\\Temp\\includetext issue\\mailmerge finish but not display correctly.doc");

doc.MailMerge.Execute(new string[] { "ProjectCustom_ProjectNumber", "ProcessFields_BidPackageNumber" },
                    new string[] { "201018", "03" });

doc.Save("E:\\Temp\\includetext issue\\20.1.pdf");

Do you still see any issues in this 20.1.pdf? Can you please also attach a comparison screenshot highlighting the problematic areas in this 20.1.pdf here for further testing?

If there are no longer any issues, then please upgrade to the latest version of Aspose.Words for .NET i.e. 20.1. Hope, this helps.

@rltejada,

We tested this scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19826. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

@pparikh

Hello Awais.hafeez,

It’s been about 3 months that we are not updated on this issue with the solution. This is to inform you that we are also paid customer and our invoice number is 448376. so, please update us on the same on the priority basis.

Let me update you for the same about my ticket.

Thanks

@NanduNairSigma,

Thanks for being patient. We have completed the analysis and the root cause of this issue has been identified. If everything goes by plan, then we are very hopeful to include the fix of this issue in next 20.5 version of Aspose.Words.

Hello @awais.hafeez ,

When can we get aspose.words 20.5 version? So, we can test out it.

Thaks

@NanduNairSigma,

The next 20.5 version of Aspose.Words will be released at the start of May 2020. We will inform you via this thread as soon as a version containing the fix of this issue will be released.

Hello Awais,

Is 20.5 version of Aspose.Words available now?

Thanks

@NanduNairSigma,

Yes, it is available now and you can upgrade to the latest 20.5 version of Aspose.Words for .NET from the following links:

@awais.hafeez Can you please confirm this will fix the issue with the process taking up all CPU. You did mention that on Jan 16th comment but since there are two issues reported in this ticket, want to confirm that the CPU issue is what got resolved with the latest build.

@NanduNairSigma,

Yes, this issue is resolved in 20.5 version of Aspose.Words for .NET. Please check this output (20.5.pdf (126.2 KB)) PDF that we generated on our end by using the following code:

Document doc = new Document("E:\\Temp\\includetext issue\\mailmerge does not finish.doc");

doc.MailMerge.Execute(new string[] { "ProjectCustom_ProjectNumber", "ProcessFields_BidPackageNumber" },
                    new string[] { "201018", "03" });

doc.Save("E:\\Temp\\includetext issue\\20.5.pdf");

The issues you have found earlier (filed as WORDSNET-19826) have been fixed in this Aspose.Words for .NET 20.5 update and this Aspose.Words for Java 20.5 update.