HI Team,
We are having issues when we are replacing the a placeholder(Document 1) with a document.
Please find the sample code which we used. Also i have attached the documents as a ZIP which contains both files(Template.docx and Document1.docx)
Document document = new Document("Template.docx");
//Load another document to replace text
IDocument replaceDocument = new Document("Document1.docx");
//Replace specified text with the other document
document.Replace("Document 1", replaceDocument, false, true);
//Save the file
document.SaveToFile("Output.docx", FileFormat.Docx2013);
I am keep getting the Exception {"Value cannot be null.\r\nParameter name: textBody"} When i am using the documents which i shared in attachments
Can you please help me sorted why we are having this exception. Please let us know if you need more information.
Thanks
Ravi