Class Template
Represents the template document that is attached to the Word document.
Inheritance
System.Object
Template
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.NET.dll
Syntax
public class Template : Object
Examples
The following code example demonstrates how to specify the path for the attached template document.
private void Button1_Click(System.Object sender, System.EventArgs e)
{
//Create a new Word document
WordDocument document = new WordDocument("Template.docx");
//Set the path for the attached template document
document.AttachedTemplate.Path = "../Data/Attachedtemplate.dotm";
//Save and close the Word document instance
document.Save("Sample.docx", FormatType.Docx);
document.Close();
}
Private Sub button_Click(sender As Object, e As EventArgs)
'Create a new Word document
Dim document As New WordDocument("Template.docx")
'Set the path for the attached template document
document.AttachedTemplate.Path = "../Data/Attachedtemplate.dotm"
'Save and close the Word document instance
document.Save("Sample.docx", FormatType.Docx)
document.Close()
End Sub
Properties
Path
Gets or sets the path of the attached template document.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string that specifies the path to attached template document. |