Hi!
I have a template that has two merge fields for example:
Branch1.Name and Branch1.Phone
When I run it like this
string[] fieldNames = new string[] { "Branch1.Name", "Branch1.Phone" };
string[] fieldValues = new string[] { "Test", "+49 123456" };
//Performs the mail merge
document.MailMerge.Execute(fieldNames, fieldValues);
everything works as expected. If I try this:
var test = new Branches
{
Branch1 = new Branch
{
Name = "Branch Name",
Number = "+49 123456"
}
};
var myList = new List<Branches> { test }.AsEnumerable();
document.MailMerge.Execute(myList);
it doesn't work.
The fields are correct if I check in
var mm = document.MailMerge.GetMergeFieldNames();
What am I doing wrong?