user3676578
user3676578

Reputation: 223

How to compare two word documents (.docx) using AppleScript?

I am trying to compare two MS Word Docx's (.docx files) using Macro's but Mac OS is not supporting VB Script and Microsoft is not providing the support for MAC OS as well.

Hence I found that, If I want to execute Macro's then I need to write AppleScript. I am very new to AppleScript, could anyone please help on this.

1) In the script, i have to get two documents from some source location and want to compare both the doc's using MS Word compare functionality.

MS Word Doc1: "http://source/old.docx";

MS Word Doc2: "http://source/new.docx";

Upvotes: 0

Views: 958

Answers (2)

Raul Benitez
Raul Benitez

Reputation: 35

It is possible to do it.

Just open the Spotlight Search => write AppleScript Editor, open it and then File => Open Dictionary, in the list, find Microsoft Word.app then click on Choose and in the input searcher write "Compare" and you will see all the commands available to compare two .docx files using Microsoft Word Office and AppleScript

Upvotes: 1

Ben
Ben

Reputation: 7597

You can't use AppleScript in this instance, I suspect you're confusing the OS-level automation provided by AppleScript with the Office-specific automation provided by Microsoft macros.

If you wish to compare two .docx files for differences, you either need to make use of a Word document-aware "diff editor" or you need to make use of a code-based solution (perhaps using docx4j or similar). Here are a couple of links to get you started:

Upvotes: 1

Related Questions