I seem to be having an issue with removing a field where fieldstart and fieldend are seperated by paragraph marks.
In the document explorer (attached file), the code below gets to the run outlined and stops thereby leaving the orphaned FieldEnd.
Below is the code that I'm using, which does work for fields where the FieldStart and FieldEnd are not seperated by paragraphs.
////// Removes the field. /// /// <param name="fieldStart">The field start. private void RemoveField(FieldStart fieldStart) { Node node = fieldStart; bool isRemoving = true; while (node != null && isRemoving) { if (node.NodeType == NodeType.FieldEnd) isRemoving = false; <span style="color: rgb(43, 145, 175);">Node</span> nextNode = node.NextPreOrder(node.Document); node.Remove(); node = nextNode; }</pre><pre style="background: white; color: black; font-family: Consolas;"> }</pre><p> Any assistance that you can provide is greatly appreciated.</p><p>Thanks</p><p>Darel</p>