I am using C# Novacode Docx library to replace string with table in a section of word file but the table is inserting below paragraph. I want to replace text(#table1#) with table in word file.
I have used this code but it doesn't replace on same location rather then it's inserting below paragraph:
foreach (var paragraph in document.Paragraphs)
{
paragraph.FindAll("#table1#").ForEach(index => paragraph.InsertTableAfterSelf((t1)));
document.ReplaceText("#table1#", "");
}
