Attaching template to a document is not working

Hi Team,


I am trying to load a pre-define .dotx template to the document to change the style of the document. but issue is the template is not getting applied to the document.

this is the code i am using for Aspose.Words latest dll.

Document.AttachedTemplate = “template filepath”;
Document.AutomaticallyUpdateSyles = true;

var documentStream = new MemoryStream();
Document.Save(documentStream, saveOptions);

Kindly help.

Thanks,
Hemanth

Team,


i got the issue, i was using the different template file path.

Thanks,
Hemanth

Hi Hemanth,


It is great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,