DocumentCopyStylesFromTemplate Method (Document)
Copies styles from the specified template to a document.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public void CopyStylesFromTemplate(
	Document template
)

Parameters

template
Type: Aspose.WordsDocument
Remarks
When styles are copied from a template to a document, like-named styles in the document are redefined to match the style descriptions in the template. Unique styles from the template are copied to the document. Unique styles in the document remain intact.
Examples
Shows how to copies styles from the template to a document via Document.
[C#]

Document template = new Document(MyDir + "Rendering.doc");

Document target = new Document(MyDir + "Document.docx");
target.CopyStylesFromTemplate(template);

target.Save(ArtifactsDir + "CopyStylesFromTemplateViaDocument.docx");
See Also