[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: diff-doc.js does not support Microsoft Word 2000 on Windows 2000 Professional

From: Jared Silva <jayrod_at_gmail.com>
Date: 2007-01-18 22:00:03 CET

Sean O'Ceirin wrote:
> I recently upgraded from tortoiseSVN to tortoiseSVN
> I am working on a Windows 2000 machine with Microsoft Office 2000 installed.
> Using the earlier version of tortoiseSVN I was able to diff word documents.
> Since I upgraded I have not been able to diff word documents.
> When I diff a word file a Windows Script Host Dialog Box appears, reporting an error in diff-doc.js on line 48
> Error: Type mismatch
> Code: 800A000D
> This exact same script seems to work on machines with Word 2003 installed.
> Looking at the javascript file the following is the javascript line throwing the error.
> destination.Compare(sBaseDoc, "", wdCompareTargetNew, true, true);

I apologize for introducing this incompatibility.

Re: Make diff-doc.js use Merge instead of Compare for documents with
existing Track Changes.

> This seems to be an issue between the diff-doc.js script only supporting Microsoft Word 2003.
> Looking at msdn there is a Compare function and a Compare2000 function. The Compare2000 Function
> only takes in one parameter.
> This seems to indicate that the script will have to be version aware so that it can call the correct function.
> After searching MSDN for a while I found the following information that kind of relates the Version number to the Microsoft Office version intalled.
> 2007 Build Info: http://support.microsoft.com/kb/928116
> 2000 Build Info: http://support.microsoft.com/kb/255275
> Based on this I but the code below in place of line 48.
> if ( Number(word.Version) <= 10 ){
> //WScript.Echo('Word is 2000 or older');
> destination.Compare(sBaseDoc);
> }
> else{
> //WScript.Echo('Word is 2003 or later');
> destination.Compare(sBaseDoc, "", wdCompareTargetNew, true, true);
> }
> I have tested locally on a machine with Word 2000 and on a machine with Word 2003 and this fix seems to work.
> I am not happy about checking that Version is less than 10 as it seems completely arbitrary. There is also a Compare2002 method that may need to be accounted for.

The current code accounts for Compare and Compare2002.


> If anyone has a cleaner fix please reply.
> Test Steps:
> Assuming a normal install on Windows
> 1. Open a cmd prompt. Run the script below, replacing the <> entries with valid URLS.
> wscript.exe "C:\Program Files\TortoiseSVN\Diff-Scripts\diff-doc.js" <insert_url_to_word_doc> <insert_url_to_another_word_doc>
> Expected Result:
> Word document opens with Track Changes turned on.

The expected result, for Word 2003, is Word comparing two documents
whether Track Changes (Revisions) exist or not.

> Actual Result:
> On Windows 2000, Document Opens but with no Track Changes. A dialog box appears with the title 'Windows Script Host Dialog Box'.

Can you explain this further? I would like to release a patch ASAP.

To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Jan 18 22:00:23 2007

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.