Is it possible to invoke MS Word functionality "Compare documents" from Microsoft JS API?

Yatin Tripathi 106 Reputation points
2023-01-13T06:27:02.34+00:00

Is there a way to invoke Word.Document.Compare method from Microsoft Javascript API or any official Javascript API that compares two Word documents?
I need to compare two Word documents and I need to do it through some Javascript API.

https://learn.microsoft.com/en-us/office/vba/api/word.document.compare

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Word | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

Accepted answer
  1. Eugene Astafiev 891 Reputation points
    2023-01-14T10:55:14.3533333+00:00

    The Office JavaScript API doesn't provide anything for that. Moreover, Office add-ins are run for a specific document, not multiple documents. Also from a web add-in you can't execute built-in controls like you could do in case of COM add-ins. So, there is no way currently.

    You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. John Korchok 6,126 Reputation points
    2023-01-14T02:10:09.63+00:00

    For Office.js questions, you'll get better answers at Stack Overflow using the office.js tag:

    [https://stackoverflow.com/questions/tagged/office-js

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.