Function SaveTestResultInaSpecifiedFolder(byval strTestPath, byval strTestResPath)
Dim qtApp
‘ Launch QuickTest
Set qtApp = CreateObject(“QuickTest.Application”) ‘ Create the Application object
qtApp.Launch ‘ Start QuickTest
qtApp.Visible = True ‘ Make the QuickTest application visible
qtApp.Open strTestPath, False ‘ Open the test
Set qtTest = qtApp.Test
Set qtResultsOpt = CreateObject(“QuickTest.RunResultsOptions”) ‘ Create the Run Results Options object
qtResultsOpt.ResultsLocation = strTestResPath ‘ Specify the location to save the test results.
qtTest.Run qtResultsOpt,True ‘Run the test and wait until end of the test run
‘ Close QuickTest Professional
qtApp.Quit
End Function
Call SaveTestResultInaSpecifiedFolder(“C:\Documents and Settings\ADMIN\Desktop\Test2″,”C:\Documents and Settings\ADMIN\Desktop\New Folder”)