Click or drag to resize
RevisionType Enumeration
Specifies the type of change being tracked in Revision.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public enum RevisionType
Members
  Member nameValueDescription
Insertion0 New content was inserted in the document.
Deletion1 Content was removed from the document.
FormatChange2 Change of formatting was applied to the parent node.
StyleDefinitionChange3 Change of formatting was applied to the parent style.
Moving4 Content was moved in the document.
Examples
Shows how to get a set of revisions in document.
Document doc = new Document(MyDir + "Document.Revisions.docx");

// Get revision group by index.
RevisionGroup revisionGroup = doc.Revisions.Groups[1];

// Get info about specific revision groups sorted by RevisionType
IEnumerable<string> revisionGroupCollectionInsertionType =
    doc.Revisions.Groups.Where(p => p.RevisionType == RevisionType.Insertion).Select(p =>
        string.Format("Revision type: {0},\nRevision author: {1},\nRevision text: {2}.\n",
            p.RevisionType.ToString(), p.Author, p.Text));

foreach (string revisionGroupInfo in revisionGroupCollectionInsertionType)
{
    Console.WriteLine(revisionGroupInfo);
}
See Also