We have some word document templates uploaded in CRM,but we have requirement to generate data in these document templates and save that documents in Shared folder
Is there any way to achieve this functionality.
*This post is locked for comments
We have some word document templates uploaded in CRM,but we have requirement to generate data in these document templates and save that documents in Shared folder
Is there any way to achieve this functionality.
*This post is locked for comments
You can retrieve the template uploaded and generate docs Do the uploaded templates. Pls use the below code to retrieve in your code.
/////// start///////////////
var template = (DocumentTemplate)service.Retrieve(DocumentTemplate.EntityLogicalName, {templateId}, new ColumnSet(true));
var ms = new MemoryStream(Convert.FromBase64String(template.Content));
var fs = new FileStream("template.docx", FileMode.CreateNew);
ms.CopyTo(fs);
fs.Flush();
fs.Close();
/////// End ///////////////
Hope this helps.If the suggestion resolved your query .Pls mark it as answered/verified to close the thread.
Hello,
Yes, you will have to write code for that.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,407
Most Valuable Professional
nmaenpaa
101,156