Track Changes in Formating

@alexey.noskov
Hi, I am Using aspose word license version 23.1.0, I am trying to read track changes in formatting like font size and font color etc…
Not showing formatting changes in track revision document attached files
TrackChangesOutPutFile.docx (21.5 KB)

InPutFile.docx (14.3 KB)
I want to Track formatting change also,
Please let me

@Nagasrinu

To track formatting changes such as font size and font color in a document using Aspose.Words, you need to ensure that the document is set to track revisions. When you make changes to the formatting, these changes should be captured as revisions.

Here’s a basic example of how to track formatting changes in a document:

using Aspose.Words;
using Aspose.Words.Revisions;

class Program
{
    static void Main()
    {
        // Create a new document and a DocumentBuilder to edit it.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);

        // Start tracking revisions with an author name.
        doc.StartTrackRevisions("Author Name", DateTime.Now);

        // Add some text with formatting changes.
        builder.Font.Size = 16; // Change font size
        builder.Font.Color = System.Drawing.Color.Red; // Change font color
        builder.Writeln("This text has a different font size and color.");

        // Change the formatting again.
        builder.Font.Size = 12; // Change font size again
        builder.Font.Color = System.Drawing.Color.Blue; // Change font color again
        builder.Writeln("This text has another font size and color.");

        // Stop tracking revisions.
        doc.StopTrackRevisions();

        // Save the document.
        doc.Save("TrackedFormattingChanges.docx");

        // Display the revisions.
        foreach (Revision revision in doc.Revisions)
        {
            Console.WriteLine($"Revision Type: {revision.RevisionType}, Author: {revision.Author}, Date: {revision.DateTime}");
        }
    }
}

In this example, we start tracking revisions before making changes to the text’s formatting. After making the changes, we stop tracking revisions. The revisions will include any formatting changes made during the tracking period.

Make sure to check the RevisionType of each revision to identify whether it is a formatting change. You can also access the ParentStyle property of the Revision object to get more details about the formatting changes.

If you are still not seeing the formatting changes in your output document, ensure that the document is being saved correctly and that you are checking the revisions after making the changes.

For more detailed information on working with revisions, you can refer to the Aspose documentation or examples related to revisions in documents.

@Nagasrinu Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not recorded as revisions.
This feature request is logged as WORDSNET-15792 . We will keep you informed and let you know once tracking formatting changes is supported.