I want to create a document (*.docx) using docx library. I have HTML formatted text from a rich text editor, and I want to save it as it is. I am not able to find any place where I can get the help. My current code is very basic, and is copy paste from there help.
My code looks like:
private string CreateDocumentFromText()
{
string filePath= Server.MapPath("../DocXExample.docx");
var document = Novacode.DocX.Create(filePath);
document.InsertParagraph("<b>Test</b>");
document.Save();
return fileName;
}
Document has content as:
<b>Test</b>
Whereas I want it to be:
Test