Hi,
Thanks for the replies.
I am nearly finished but I am getting a very strange bug with the attached document, I use the following method to delete the field:
public static void DeleteField(FieldStart fieldStart)
{
fieldStart.NextSibling.NextSibling.Remove();
fieldStart.NextSibling.Remove();
fieldStart.Remove();
}
I am then inserting a new custom field with the following code:
public static void BuildField(Paragraph parentParagraph, bool isReviewedBy, bool isAuthorisedBy, IDocumentParent documentParent)
{
var documentBuilder = new DocumentBuilder(parentParagraph.Document);
var value = GetSignOffList(documentParent, isAuthorisedBy);
var fieldText = string.Format(@"MERGEFIELD {0} \* MERGEFORMAT", (isReviewedBy) ? "ReviewList" : "AuthorisedBy");
documentBuilder.MoveTo(parentParagraph);
documentBuilder.InsertField(fieldText, value);
}
Everything is working fine apart from if you press ALT and F9 with the attached document, you can see that the background colour of the first field is yellow.
I am absolutely lost as to where this colour might be coming from. Any idea how I can get rid of this strange background coour?
Cheers
Paul