Hi,
I was tried to replace the bookmark with HTML data, but i was lost the paragraph formatting after replacement. Here is my test code to reproduce this issue and PFA for my doc template and html.
Document od = new Document(@"D:\QualItem.dot");
DocumentBuilder builderDocReplace = new DocumentBuilder(od);
Bookmark bkHTML = od.Range.Bookmarks["TestResultResult1"];
if (bkHTML != null)
{
bkHTML.Text = "";
builderDocReplace.MoveToBookmark("TestResultResult1");
builderDocReplace.InsertHtml(File.ReadAllText(@"D:\text.html"));
builderDocReplace.EndBookmark("TestResultResult1");
}
od.Save(@"D:\text.doc");
In Actual Results column, The paragraph numbers 1,2,3… are missing. only 7 and 13 are showing. Please let me know how fix this issue.
Thanks,