Hello,
Thanks for your feedback.
For mail merge, we have a DictionaryEntry method, but this method doesn't work in your case.
In addition, combined with your previous posts, using the Execute(DataTable table) method is the most suitable for your needs. If the table does not set the name of the column, the data for the corresponding column cannot be found during the mail merge. Based on the code you provided in your first post, you can use the following code to add column names.
- Code: Select all
Product product = new Product();
foreach (PropertyInfo fi in product.GetType().GetProperties())
{
dataTable.Columns. Add(new DataColumn(fi.Name));
}
Sincerely,
Annika
E-iceblue support team