diff --git a/OpenXmlWordHelpers.cs b/OpenXmlWordHelpers.cs index 0196b2a..a37df90 100644 --- a/OpenXmlWordHelpers.cs +++ b/OpenXmlWordHelpers.cs @@ -103,11 +103,13 @@ public static void ReplaceWithText(this FieldCode field, string replacementText) Run rSep = rFldCode.NextSibling(); Run rText = rSep.NextSibling(); Run rEnd = rText.NextSibling(); + Run rRight = rEnd.NextSibling(); rFldCode.Remove(); rBegin.Remove(); rSep.Remove(); rEnd.Remove(); + rRight.Remove(); Text t = rText.GetFirstChild(); if (t != null)