Re: Compare documents with AppleScript

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Try

set doc1 to choose file with prompt "Please select a Word document file:"
set doc2 to choose file with prompt "Please select a Word document file:"
tell application "Microsoft Word"
open doc1
compare active document path doc2 as text
end tell

(doc1 and doc2 will either be alias or file objects - I am not sure. Sometimes commands are OK with the object, but sometimes they want a string)

Peter Jamieson

http://tips.pjmsn.me.uk

On 01/12/2009 22:51, Thomas_Röfer@xxxxxxxxxxxxxxxx wrote:
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel
I am trying to compare two documents with a script that calls Word's
compare command:

set doc1 to choose file with prompt "Please select a Word document file:"
set doc2 to choose file with prompt "Please select a Word document file:"
tell application "Microsoft Word"
open doc1
compare active document path doc2
end tell

It seems that the command "compare" is not understood. The same is true
for the command "merge". However, according to the documentation, they
should exist.

What is wrong?
.



Relevant Pages

  • Re: getting word to prompt to save on Close
    ... I think the problem here is that the Word document isn't "dirty": ... the prompt to save works as intended. ... > newbie to Word Automation, am doing Document.Close, and have tried ...
    (microsoft.public.word.vba.beginners)
  • Re: Converting Word 6.0 to Word 2002?
    ... Save it as "Word Document." ... does the prompt ask if you want to convert ... Microsoft MVP (Word) ... "Bob Henry" wrote: ...
    (microsoft.public.word.docmanagement)
  • Finding and Inserting
    ... in the word document that are in [brackets]. ... I want a prompt to come up as ask "insert title". ... acceptance of our offer of employment as an Accountant. ...
    (microsoft.public.word.vba.beginners)
  • Re: Recursively find delimited word in document
    ... for the replacement text as each string is found. ... .Collapse Direction:=wdCollapseStart ... I am developing a VB6 app that opens a Word document to ... it with a string which I prompt the user for. ...
    (microsoft.public.vb.general.discussion)
  • Numbering in footer - prompts to save the document after printing
    ... I have a word document with footer, ... number as X of Y. I added the page number from 'Header ... and Footer Tool' using the options, ... We dont want the word to prompt. ...
    (microsoft.public.word.numbering)