Allows to specify base document which will be used during comparison. Default value is Current. 
Shows how to filter specific types of document elements when making a comparison. 
auto docOriginal = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(docOriginal);
 
builder->Writeln(u"Hello world! This is the first paragraph.");
builder->InsertFootnote(FootnoteType::Endnote, u"Original endnote text.");
 
builder->StartTable();
builder->InsertCell();
builder->Write(u"Original cell 1 text");
builder->InsertCell();
builder->Write(u"Original cell 2 text");
builder->EndTable();
 
SharedPtr<Shape> textBox = builder->InsertShape(ShapeType::TextBox, 150, 20);
builder->MoveTo(textBox->get_FirstParagraph());
builder->Write(u"Original textbox contents");
 
builder->MoveTo(docOriginal->get_FirstSection()->get_Body()->AppendParagraph(u""));
builder->InsertField(u" DATE ");
 
newComment->SetText(u"Original comment.");
builder->get_CurrentParagraph()->AppendChild(newComment);
 
builder->Writeln(u"Original header contents.");
 
auto docEdited = System::DynamicCast<Document>(docOriginal->Clone(true));
SharedPtr<Paragraph> firstParagraph = docEdited->get_FirstSection()->get_Body()->get_FirstParagraph();
 
firstParagraph->get_Runs()->idx_get(0)->set_Text(u"hello world! this is the first paragraph, after editing.");
    ->get_FirstParagraph()
    ->get_Runs()
    ->idx_get(1)
    ->set_Text(u"Edited endnote text.");
(System::DynamicCast<Table>(docEdited->GetChild(
NodeType::Table, 0, 
true)))
    ->get_FirstRow()
    ->get_Cells()
    ->idx_get(1)
    ->get_FirstParagraph()
    ->get_Runs()
    ->idx_get(0)
    ->set_Text(u"Edited Cell 2 contents");
(System::DynamicCast<Shape>(docEdited->GetChild(
NodeType::Shape, 0, 
true)))
    ->get_FirstParagraph()
    ->get_Runs()
    ->idx_get(0)
    ->set_Text(u"Edited textbox contents");
(System::DynamicCast<FieldDate>(docEdited->get_Range()->get_Fields()->idx_get(0)))->set_UseLunarCalendar(true);
    ->get_FirstParagraph()
    ->get_Runs()
    ->idx_get(0)
    ->set_Text(u"Edited comment.");
docEdited->get_FirstSection()
    ->get_HeadersFooters()
    ->get_FirstParagraph()
    ->get_Runs()
    ->idx_get(0)
    ->set_Text(u"Edited header contents.");
 
auto compareOptions = MakeObject<Aspose::Words::Comparing::CompareOptions>();
compareOptions->set_IgnoreFormatting(false);
compareOptions->set_IgnoreCaseChanges(false);
compareOptions->set_IgnoreComments(false);
compareOptions->set_IgnoreTables(false);
compareOptions->set_IgnoreFields(false);
compareOptions->set_IgnoreFootnotes(false);
compareOptions->set_IgnoreTextboxes(false);
compareOptions->set_IgnoreHeadersAndFooters(false);
 
docOriginal->Save(ArtifactsDir + u"Document.CompareOptions.docx");