Hello team,
I’ve removed the content control from the Word document, but now my table of contents (TOC) link isn’t working. I’ve added my bookmark inside the content control. How can I resolve this issue? I’ve checked in the backend, and my destination bookmark still exists in the document after removing the content control. How can I resolve this issue?
Snippet :
doc.GetChildNodes(NodeType.StructuredDocumentTag, true).Cast<StructuredDocumentTag>().ToList()
.ForEach(sdt => sdt.RemoveSelfOnly());
Before Removing Content Control:
TOC1.docx (16.9 KB)
After Removing Content Control:
TOC2.docx (11.0 KB)