Hi,
i’m wondering how I can use the mail merge option to list mail merge missing field that are in de doc but not found in the datasource.
i don’t find any clear exemple of that use.
my code look like :
Dim doc As Document = documentTemplate.Clone()
doc.MailMergeSettings.CheckErrors = Aspose.Words.Settings.MailMergeCheckErrors.CollectErrors
Try
doc.MailMerge.Execute(dataSource)
Catch ex As Exception
Dim message As String = String.Format(“Mail merge fail : {0}”, ex)
Throw New MailMergeException(message)
End Try
Dim outStream As MemoryStream = New MemoryStream()
doc.Save(outStream, SaveFormat.Pdf)
Dim data As Byte() = outStream.ToArray()
Return data