private void UpdateFieldCode(string fieldName)
{
// Field code is stored in a Run node between field start and field separator.
Run fieldCode = (Run)mFieldStart.NextSibling;
Match match = gRegex.Match(((FieldStart)mFieldStart).GetField().GetFieldCode());
string newFieldCode = string.Format(" {0}{1} ", match.Groups["start"].Value, fieldName);
fieldCode.Text = newFieldCode;
// But sometimes the field code can consist of more than one run, delete these runs.
RemoveSameParent(fieldCode.NextSibling, mFieldSeparator);
}