Hi all,
I use the below code to add a new document in c#, but i need to develop the code which will generate the document with the same name with extension Document.doc to Documentfig.doc and save it in the same folder of source file.
// Create a new empty document.
DocumentModel document = new DocumentModel();
// Add document content.
document.Sections.Add(
new Section(document,
new Paragraph(document, "Hello World!")));
// Save the document to a file.
document.Save("Document.docx", SaveOptions.DocxDefault);
// Open the document file with Microsoft Word.
Process.Start("Document.docx");
Deepakkumar G.