Hi,
I am trying to change the font color of the insertions and deletions. I am using below code and not sure what is wrong in this as I am not able to change any colors.
public void Compare(string document1, string document2, string comparisonDocument, ref int added, ref int deleted)
{
added = 0;
deleted = 0;
// Load both documents in Aspose.Words
Document doc1 = new Document(document1);
Document doc2 = new Document(document2);
Document docComp = new Document(document1);
DocumentBuilder builder = new DocumentBuilder(docComp);
doc1.LayoutOptions.RevisionOptions.InsertedTextColor = Aspose.Words.Layout.RevisionColor.BrightGreen;
doc1.LayoutOptions.RevisionOptions.DeletedTextColor = Aspose.Words.Layout.RevisionColor.DarkYellow;
doc1.Compare(doc2, "a", DateTime.Now);
foreach (Revision revision in doc1.Revisions)
{
switch (revision.RevisionType)
{
case RevisionType.Insertion:
added++;
break;
case RevisionType.Deletion:
deleted++;
break;
}
Console.WriteLine(revision.RevisionType + ": " + revision.ParentNode);
}
Debug.WriteLine("Revisions: " + doc1.Revisions.Count);
doc1.Save(comparisonDocument);
}
}
Please help.
Thanks