Is there a way to keep comments on a word document during conversion?
For example, I have a comment on my document so I convert it to html and then go back to docx / doc, is it possible to bring my comments?
Document document = new Document();
document.LoadFromFile("test.docx");
//Add this line
document.HTMLCustomComment = true;
document.SaveToFile("toHTML.html", FileFormat.Html);
document.LoadFromFile("toHTML.html", FileFormat.Html, XHTMLValidationType.None);
document.SaveToFile("test.docx", FileFormat.Docx);
lynn.zhang wrote:Hi
Thanks for your post.
Our Spire.Doc allows parsing and writing comment of document when converting to html.Please refer to the code below. If there is still any question, please provide your Word document for our reference.
- Code: Select all
Document document = new Document();
document.LoadFromFile("test.docx");
//Add this line
document.HTMLCustomComment = true;
document.SaveToFile("toHTML.html", FileFormat.Html);
document.LoadFromFile("toHTML.html", FileFormat.Html, XHTMLValidationType.None);
document.SaveToFile("test.docx", FileFormat.Docx);
Sincerely,
Lynn
E-iceblue support team