Post defect to QC

Set TDConnection = CreateObject("TDApiOle.TDConnection")
TDConnection.InitConnection "http://testdb/tdbin" 'DB URL
TDConnection.ConnectProject "projectname","username","password"
If TDConnection.Connected Then
 reporter.reportevent micPass,"Connection","Connection successful"
Else
 reporter.reportevent micFail,"Connection","Connection Failed"
End If
Set BugFactory = TDConnection.BugFactory
Set Bug = BugFactory.AddItem (Nothing)
Bug.Status = "New"
Bug.Summary = "Connecting to TD"
Bug.Priority = "4-Very High"
Bug.AssignedTo = "admin"
Bug.DetectedBy = "admin" 
Bug.Post