Hi,
I'm using the simple MailMerge example of your help pages (where I replaced Template.docx through my own template file). The given fieldNames do exist in the word template.
WordDocument document = new WordDocument(filename);
string[] fieldNames = new string[] { "Emp_Id", "Name", "Phone", "City" };
string[] fieldValues = new string[] { "1001", "Peter", "+122-2222222", "London" };
//Performs the mail merge.
document.MailMerge.Execute(fieldNames, fieldValues);
//Saves and closes the WordDocument instance
document.Save("Sample.docx", FormatType.Docx);
document.Close();
I'm getting a NullReferenceException at the "Execute" statement (StackTrace: "at Syncfusion.DocIO.DLS.WField.UpdateFieldRange()"). Is there a bug or am I doing something wrong?
Best wishes
Gernot