Invoking ExamDiff from MS Access Visual Basic API

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
arobustus1
Junior Member
Posts: 11
Joined: Fri Dec 30, 2011 11:03 am

Invoking ExamDiff from MS Access Visual Basic API

Post by arobustus1 »

I have an Access database application which among its many cool features outputs files from text fields showing what they said when a user entered a given form, and what said they when that user exits that form. That is

Original.txt
Blah blah
Blah blah
Blah blah
EOF

Changed.txt
Blah blah
Blah
Bloo Blah
Blah blah b' blah blah
EOF

Can someone point me in the right direction so that I can allow users to display the file comparison in ExamDiff from Access? We are using ExamDiff Pro version 6 and MS Office 2010.
Thank You!
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: Invoking ExamDiff from MS Access Visual Basic API

Post by psguru »

The only way to launch ExamDiff Pro from another application is via its command line. If Access allows it, this is the way to proceed.
psguru
PrestoSoft
arobustus1
Junior Member
Posts: 11
Joined: Fri Dec 30, 2011 11:03 am

Re: Invoking ExamDiff from MS Access Visual Basic API

Post by arobustus1 »

Thank you it does. To get the double quotes to match the command line string I saw in a different post (http://tinyurl.com/bmfwc7c) you have to play this kind of game:
Private Sub CallExamDiff_Click()
Dim sDOSCMD As String
Dim sCmdLine As String
Dim dblRetVal As Double
Dim sF1, sF2 As String
sF1 = "G:\MAIER F2\INFO\Notes\1021_Org.txt"
sF2 = "G:\MAIER F2\INFO\Notes\1021_New.txt"
'DOS SHELL SEND TO VBA*******************
sDOSCMD = "C:\Program Files\ExamDiff Pro\ExamDiff.exe " & Chr(34) & sF1 & Chr(34) & " " & Chr(34) & sF2 & Chr(34)
sCmdLine = sDOSCMD
'SEND TO DOS
dblRetVal = Shell(sCmdLine, vbHide) 'VBHIDE HIDES SHELL WINDOW (BLACK DOS WINDOW)
End Sub
Post Reply