I’ve been asked to try an resolve an issue with an existing project that uses Aspose.Words (16.6.0.0) & Aspose.Cells (8.9.0.0).
The issue I’m dealing with was one where a mailmerge (using Aspose.Word) is carried out and as a result there are many instances of the document created, this is due to there being multiple records, however I was able to amend the mailmerge statement causing this to:
Funding Name: { MAILMERGE TableStart:CoursBookingCost } { MAILMERGE CourseBookingCost_FundingTypeName } {MAILMERGE TableEnd:CourseBookingCost }
This gives me the one document but ends up with the record values repeated for each record in the table, this is a better result as they end up with only one document, but they still have to edit it to remove the surplus record results.
An example mailmerge result would be
“Funding Name: TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1 TEST1”
What I’m looking for is for a way to return just the first record and display it in the document so that it appears as:
“Funding Name: TEST1”
Is anyone aware of a mailmerge conditional statement I can use within the template document that would accomplish this, as the system is live I’m not in a position to amend any of the underlying code.
Many Thanks
Rudi