I need to attach a datasource to a Word document. The code completes properly but when I open the saved document using MSWord it says that it cant find the datasource.
The code I am using is;
Dim tmpDocument As New Aspose.Words.Document("Prec_document.docx")
tmpDocument.MailMergeSettings.Clear()
tmpDocument.MailMergeSettings.MainDocumentType = Settings.MailMergeMainDocumentType.FormLetters
tmpDocument.MailMergeSettings.DataType = Settings.MailMergeDataType.TextFile
tmpDocument.MailMergeSettings.DataSource = "Prec_datasource.txt"
tmpDocument.Save("Prec_document.docx")
I attach the document, the datasource and the MSWord error. To reproduce the issue simply run the code above with the attached document and datasource.
Thanks
Datasource not found error.png (17.6 KB)
.Prec_datasource.zip (8.8 KB)