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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.