Setting author of changes

On this page

GroupDocs.Comparison allows you to set author of changes name in the resulting document. To do this, follow these steps:

  1. Instantiate the Comparer object. Specify a source file path or an input stream.
  2. Call the Add method. Specify a target file path or an input stream.
  3. Instantiate the WordCompareOptions object. Set DisplayMode to Revisions and ShowRevisions to true.
  4. Set author of changes by changing the RevisionAuthorName property.
  5. Call the Compare method. Specify the WordCompareOptions object from previous step.

The following code snippet shows how to change author of changes:

using (Comparer comparer = new Comparer("source.docx"))
{
  comparer.Add("target.docx");

  WordCompareOptions options = new WordCompareOptions()
  {
    DisplayMode = WordCompareOptions.ComparisonDisplayMode.Revisions,
    ShowRevisions = true,
    RevisionAuthorName = "New author",
  };

  comparer.Compare("result.docx", options);
}

The result is as follows:

Change author

See also

On this page

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.