Hi Smita,
Hi ,
I have an issue with merging the fields with regions.
I have placed the merge fields in the word document as below
«TableStart:RejectReasons»
«RejectReason» «TableEnd:RejectReasons»
XML will look like below.. I can able to merge all the other fields except 'Reject Reasons'
In our code behind file:
XElementMailMergeDataSource ds = new XElementMailMergeDataSource(correspondence.DocumentData, "Main");
doc.MailMerge.Execute(ds);
XElementMailMergeDataSource rejectReasons = new XElementMailMergeDataSource(correspondence.DocumentData, "RejectReasons");
doc.MailMerge.ExecuteWithRegions(rejectReasons);
Any help is appreciated.
Thanks!
Hi there,
Hi ,
Please find the attached text file which has the code for XElementMailMergerDataSource.
Thanks and appreciate your help!
Hi,
Please find the attached document template..
Thanks,
Hi Smita,
Hi ,
Thanks, but I am getting errors with the code snippet , can you please send me the solution file, if you have any for the above code sinppet, so that i can try to run seperately and see it.
Thanks!
Hi,
According to your codesnippet which has 'MyMailMergeDataSource' class, I need to change lot of my code
by using my XElementDataSource class, can you please get the solution for it. And also can you use the Xml which i have attached..
Thanks!
Hi,
Please find the attached zip file, i did the changes to my code according to your sample code that you sent. But still it is not working..
Any help will be appreciated...
Hi Smita,
Please accept my apologies for late response. I am working on your query and will update you asap.
Hi Smita,
Please accept my apologies for your inconvenience.
I have attached the Visual Studio solution of shared code by my colleague Imran. Please execute this application at your side and let us know If you face any issue. I have attached input and output files with this post.
Please modify the attached code as per your requirement and let us know, If you still face problem. We are really keen to help you but need some more feedback from your side.