I am attempting to write a VBA script that will run a QC test set whenever an email comes in with a specific subject. Has anyone attempted this on a Win 7, 64 bit machine running Outlook 2010? The thought behind it is that as dev pushes code they would send a pre-formatted email that would start regression testing. Any help would be appreciated. Here is the VBA code.

Sub Run_QC()

'Const qcServer = "http://*****/qcbin/"
Const qcDomain = "*******"
Const qcProject = "********"
Const qcUser = "**********"
Const qcPassword = "**********"
Dim tdc
Dim qcServer
Dim objArgs
Dim strArg
Dim strTestSet
Dim bRunCode

'======GETTING ARGUMENTS==============
'Set objArgs = WScript.Arguments
'If WScript.Arguments.Count < 1 Or WScript.Arguments.Count > 2 Then
'WScript.Echo "Please enter the name of the test set"
'bRunCode = False
'For Each strArg In objArgs
strTestSet = "*********"
bRunCode = True
'End If

If bRunCode Then
qcServer = "http://" & "***********"
qcServer = qcServer & "/qcbin"
Set tdc = CreateObject("tdapiole80.tdconnection")

If (tdc Is Nothing) Then
MsgBox "tdc object is empty"
End If

tdc.InitConnectionEx qcServer
tdc.Login qcUser, qcPassword
tdc.Connect qcDomain, qcProject

RunTestSet tdc

'Disconnect from the project
If tdc.Connected Then
End If
'Log off the server
If tdc.LoggedIn Then
End If
'Release the TDConnection object.
'Check status (For illustrative purposes.)
Set tdc = Nothing
End If
End Sub
Public Sub RunTestSet(otdc)

Dim TSetFact, tsList
Dim theTestSet
Dim tsTreeMgr
Dim tsFolder
Dim Scheduler
Dim nPath
Dim execStatus

Set TSetFact = otdc.TestSetFactory
Set tsTreeMgr = otdc.TestSetTreeManager
nPath = "Root\**********"
Set tsFolder = tsTreeMgr.NodeByPath(nPath)
If tsFolder Is Nothing Then
Err.Raise vbObjectError + 1, "RunTestSet", "Could not find folder " & nPath
End If
Set tsList = tsFolder.FindTestSets("***********")
If tsList Is Nothing Then
Err.Raise vbObjectError + 1, "RunTestSet", "Could not find test set in the " & nPath
End If
Set theTestSet = tsList.Item(1)
'Start the scheduler on the local machine
Set Scheduler = theTestSet.StartExecution(HostName)

Dim TSTestFact, TestList
Dim tsFilter
Dim TSTst
'Get the test instances from the test set
Set TSTestFact = theTestSet.TSTestFactory
Set tsFilter = TSTestFact.Filter
tsFilter.Filter("TC_CYCLE_ID") = theTestSet.ID
Set TestList = TSTestFact.NewList(tsFilter.Text)
Scheduler.RunAllLocally = False
'End Select

'Run the tests

Set execStatus = Scheduler.ExecutionStatus

While (RunFinished = False)
execStatus.RefreshExecStatusInfo "all", True
RunFinished = execStatus.Finished
End Sub