Setting author of changes
Leave feedback
On this page
GroupDocs.Comparison allows you to set author of changes name in the resulting document. To do this, follow these steps:
- Instantiate the Comparer object. Specify a source file path or an input stream.
- Call the Add method. Specify a target file path or an input stream.
- Instantiate the CompareOptions object. Set the WordTrackChanges and ShowRevisions properties to
true
. - Set author of changes by changing the RevisionAuthorName property.
- Call the Compare method. Specify the CompareOptions object from previous step.
The following code snippet shows how to change author of changes:
using (Comparer comparer = new Comparer(sourcePath))
{
comparer.Add(targetPath);
CompareOptions options = new CompareOptions()
{
ShowRevisions = true,
WordTrackChanges = true,
RevisionAuthorName = "New author",
};
comparer.Compare(resultPath, options);
}
The result is as follows:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.