Forum Discussion
HKosova
Alumni
12 years agoHi Richard,
The WordDocs.Compare extension should work fine for Office 2013, too.
My machine uses Office 2013 so I could not verify if that plug in worked or not
The example I posted dumps the fc output to the Additional Information panel in the test log. Here's an improved version that also dumps fc errors like "file not found". Can you try it and see what Additional Info says?
and the command line snippet still has the same issue of opening and closing without being able to see a result.
strFile = ... ' Your strFile value
Dim oShell, oExec
Set oShell = Sys.OleObject("WScript.Shell")
Set oExec = oShell.Exec("fc ""C:\Users\%USERNAME%\Documents\" & strFile & _
".docx"" ""C:\Users\%USERNAME%\Documents\" & strFile & "2.docx""")
Do While oExec.Status = 0
Delay 100
Loop
Select Case oExec.ExitCode
Case 0: Log.Checkpoint "The files are the same.", oExec.StdOut.ReadAll
Case 1: Log.Error "The files are different. See Additional Info.", oExec.StdOut.ReadAll
Case Else: Log.Error oExec.StdErr.ReadAll
End Select
Could file paths be wrong? What's the strFile value?
I'm assuming this means something is going wrong somewhere.