Is it somehow possible to save the data source in the word|_rel|settings.xml.rels?
Because manually, I can save my attached data source in this location.
My goal is that when a user opens a docx file, that they can then automatically use the attached data source file in the mailings tab.
What I have tried so far:
const auto doc = System::MakeObject\<Aspose::Words::Document\>(u"C:\\dev\\aspose\\mailmerge.docx");
auto mailmergeSettings = doc->get_MailMergeSettings();
auto odsoObject = System::MakeObject\<Aspose::Words::Settings::Odso\>();
odsoObject->set_DataSource(u"C:\\dev\\aspose\\mailmerge.txt");
mailmergeSettings->set_Odso(odsoObject);
doc->Save(u"C:\\dev\\aspose\\mailmerge101.docx", Aspose::Words::SaveFormat::Docx);
After saving the file, sadly doesn’t keep the attachment.