Search code examples
vbatextms-wordcompareinstances

Compare text between multiple MS Word opened documents


I'm trying to compare two texts located in different Office Word opened documents. For that I'm struggling to create a macro that could get all the running instances of Word and allow the user to choose by its filename which one to use as data source for the comparison.

I have an idea how I could compare the two texts once gotten but What I didn't figure out yet is how to get the all MS Word running instances and their détails like the filename as an example.

I would be thankful if you guys can help me with this.


Solution

  • Word has a built-in feature for that.

    The legal blackline option compares two documents and displays only what changed between them. The documents that are being compared are not changed. The legal blackline comparison is displayed by default in a new third document.
    https://support.office.com/en-gb/article/Compare-document-differences-using-the-legal-blackline-option-dbfc7351-4022-43a2-a0c4-54d1898702a0

    enter image description here