I recently upgraded from tortoiseSVN 1.3.2.5840 to tortoiseSVN 1.4.1.7992
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);
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.
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.
Actual Result:
On Windows 2000, Document Opens but with no Track Changes. A dialog box appears with the title 'Windows Script Host Dialog Box'.
__________________________________________________________
The information contained in this e-mail is confidential, may be privileged and is intended
only for the user of the recipient named above. If you are not the intended recipient or a
representative of the intended recipient, you have received this e-mail in error and must
not copy, use or disclose the contents of this e-mail to anybody else.
If you have received this e-mail in error, please notify the sender immediately by return
e-mail and permanently delete the copy you received. This e-mail has been swept for
computer viruses. However, you should carry out your own virus checks.
Registered in Ireland, No. 205721. http://www.FINEOS.com
__________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu Jan 18 11:06:37 2007