Click or drag to resize

DocumentCreate Method

Create a new document file from a template

Namespace:  SIC.OpenDocumentFormat.MSWord
Assembly:  SIC.OpenDocumentFormat (in SIC.OpenDocumentFormat.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public void Create(
	string pFile,
	string pFileTemplate = ""
)

Parameters

pFile
Type: SystemString
New document file name
pFileTemplate (Optional)
Type: SystemString
Template file name
Examples
string DocumentFile = Path.Combine(Environment.CurrentDirectory, "SampleDocument.docx");
string TemplateFile = Path.Combine(Environment.CurrentDirectory, "Sample.dotx");
SIC.OpenDocumentFormat.MSWord.Document lDocument = new SIC.OpenDocumentFormat.MSWord.Document();
lDocument.Create(DocumentFile, TemplateFile);
See Also