SaveOptionsCreateSaveOptions Method (String) |
Namespace: Aspose.Words.Saving
Document doc = new Document(); // If we set this flag to true while not having a template attached to the document, // there will be no effect because there is no template document to draw style changes from doc.AutomaticallyUpdateStyles = true; Assert.That(doc.AttachedTemplate, Is.Empty); // We can set a default template document filename in a SaveOptions object to make it apply to // all documents we save with it that have no AttachedTemplate value SaveOptions options = SaveOptions.CreateSaveOptions("Document.DefaultTemplate.docx"); options.DefaultTemplate = MyDir + "Busniess brochure.dotx"; doc.Save(ArtifactsDir + "Document.DefaultTemplate.docx", options);