# Get comparison result as an object model Retrieve the comparison result as a GroupDocs.Comparison Document object to inspect changes or pass the result stream to Aspose.Words for further manipulation. [GroupDocs.Comparison](https://products.groupdocs.com/comparison/net) allows you to get result document object model after comparison. To get result document object, follow these steps: 1. Instantiate the [Comparer](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/comparer) object. Specify the source document path or stream. 2. Call the [Add](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/comparer/methods/add/index) method. Specify the target document path or stream. 3. Call the [Compare](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/comparer/methods/compare) method and assign its return value to a [Document](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/document/) object. You can retrieve the name, password, changes, stream and other document information using [Document](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/document/) object. Also, our object model is fully compatible with the object models of Aspose libraries. The following code snippets show how to get changes and create new Aspose Word document using result document object model: ## Obtain the result document object and get changes {{< tabs "example1">}} {{< tab "C#" >}} ```csharp using System; using GroupDocs.Comparison; // ... using (Comparer comparer = new Comparer("source.docx")) { comparer.Add("target.docx"); GroupDocs.Comparison.Document resultDocument = comparer.Compare("result.docx"); foreach (var change in resultDocument.Changes) { Console.ForegroundColor = ConsoleColor.Green; Console.Write("Source test: "); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(change.SourceText); Console.ForegroundColor = ConsoleColor.Blue; Console.Write("Target test: "); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(change.TargetText + "\n"); } } ``` {{< /tab >}} {{< /tabs >}} The result is as follows: ![](https://docs.groupdocs.com/comparison/net/images/how-to-get-result-document-object.png) ## Create a new Word document based on the result document and modify its contents You can use the Comparison [Document](https://reference.groupdocs.com/comparison/net/groupdocs.comparison/document/) object to generate Aspose documents and perform modifications seamlessly. The resultDocument.Stream will contain an Aspose document object corresponding to the format being compared. {{< tabs "example2">}} {{< tab "C#" >}} ```csharp using System; using GroupDocs.Comparison; using Aspose.Words; // ... using (Comparer comparer = new Comparer("source.docx")) { // Add target document and save comparison result to Comparison.Document object comparer.Add("target.docx"); GroupDocs.Comparison.Document resultDocument = comparer.Compare("result.docx"); // Create a new Aspose Document object of corresponding format. Aspose.Words.Document asposeDocument = new Aspose.Words.Document(resultDocument.Stream); // Access the Document's builder to add content. DocumentBuilder builder = new DocumentBuilder(asposeDocument); // Add some text to the document. builder.Writeln("Hello, World!"); builder.Write("This is an example of using Aspose.Words."); // Save the document to a file. asposeDocument.Save("output.docx"); } ``` {{< /tab >}} {{< /tabs >}} The result is as follows: ![](https://docs.groupdocs.com/comparison/net/images/modify-result-document-using-aspose.png) ## See also - [Compare documents]({{< ref "comparison/net/comparison-basic/compare-documents.md" >}}) - [Get list of changes]({{< ref "comparison/net/advanced-usage/comparison/get-list-of-changes.md" >}}) - [Get file info]({{< ref "comparison/net/comparison-basic/get-file-info.md" >}})