Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions OpenXmlWordHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ public static void ReplaceWithText(this FieldCode field, string replacementText)
Run rSep = rFldCode.NextSibling<Run>();
Run rText = rSep.NextSibling<Run>();
Run rEnd = rText.NextSibling<Run>();
Run rRight = rEnd.NextSibling<Run>();

rFldCode.Remove();
rBegin.Remove();
rSep.Remove();
rEnd.Remove();
rRight.Remove();

Text t = rText.GetFirstChild<Text>();
if (t != null)
Expand Down