We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set template name?

this is a document generated from a template, using word.
it has the template name under ‘more properties’.
image.png (3.9 KB)

I am trying to accomplish that same thing through aspose, but can’t work it out:

image.png (3.5 KB)

i am using this code when intializing a new document:
m_AsposeDocument = new Aspose.Words.Document(Template); // create an instance of an ASPOSE document
m_AsposeDocument.BuiltInDocumentProperties.Template = Path.GetFileName(Template);
Is there something else I should be doing?
Aspose 18.4

@conniem,

Please try using the following code:

Document doc = new Document(MyDir + @"input.docx");
doc.AttachedTemplate = MyDir + "sometemp.dot";
doc.Save(MyDir + @"18.5.docx");