We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Section Names

Is there any way to get the section name before merging data into a Word document? I see the Sections list provided, but it does not contain any identifiable information as far as I can tell. I have a scenario where the Word template has some group data and some non-group data. I have a dataset that contains a list of tables that need to get merged into the document. One table will contain the general fill-in information for the document as a whole, and the other table(s) will contain detail information to be repeated within the groups in the document. I have attached a simple example of the scenario. In this scenario, the general table would have a row for a single person. A second table named Salary would have a list of salary records for that person. I could group the person information, however, I would prefer not to for various reasons. If I knew the section names, I could run only the "group" tables through the ExecuteGroup process and then turn around and run the remaining general table for a regular execute. Not sure if I explained that well.

TestLetter.zip

3 Replies

AD Administrator Syncfusion Team July 5, 2006 07:09 PM UTC

Hi Mark, Thank you for your interest with Essential DocIO. 1. It is not possible to get the section names from the word document. Because of there is no specific API for set or get the section name from the document. 2. As per your requirement, can you use Mailmerge.Execute() method for non-group data and use Mailmerge.ExecuteGroup() method for group data from the template document merge fields. I am not sure if I understand you requirement is correct. However I have created a sample for this scenario. Please take a look for this sample and let me know if it satisfied your requirement. Sample : Mailmerge_Sample.zip Thanks, Prabhu.


AD Administrator Syncfusion Team July 6, 2006 01:06 PM UTC

Thank you for your response. Unfortunately it is a very dynamic process that I am designing so I wouldn''t be able to restrict the Execute and ExecuteGroup methods to be run on specific queries. I''ll have to find another way around that. Thank you for clarifying that section names were unavailable. >Hi Mark, > >Thank you for your interest with Essential DocIO. > >1. It is not possible to get the section names from the word document. Because of there is no specific API for set or get the section name from the document. > >2. As per your requirement, can you use Mailmerge.Execute() method for non-group data and use Mailmerge.ExecuteGroup() method for group data from the template document merge fields. I am not sure if I understand you requirement is correct. However I have created a sample for this scenario. Please take a look for this sample and let me know if it satisfied your requirement. > >Sample : Mailmerge_Sample.zip > >Thanks, >Prabhu. >


AD Administrator Syncfusion Team July 11, 2006 05:57 PM UTC

Hi Mark, Sorry for the delay in responding. 1. Currently it is not possible to set or get the sections name from the document. I have added this as a feature request with our development team. You can track the live status of this feature here, http://www.syncfusion.com/support/features/docio/Default.aspx?ToDo=view&questId=1057 2. I have created a sample that generating a Mailmerge template document dynamically as per passing specific query by selecting the employee ID from the listbox in sample. Also it is possible to generate all the employee details in single master document. Please take a look for this sample and let me know if it helps. Sample :
Mailmerge_Sample.zip
Thanks, Prabhu.

Loader.
Live Chat Icon For mobile
Up arrow icon