-------Code----------
Dim CurrentRun, attachment
On error resume next
If QCUtil.IsConnected Then
Set CurrentRun =QCUtil.CurrentRun
Set attachment = CurrentRun.Attachments
If Err.Number = 424 Then
Reporter.ReportEvent micWarning, "Not running through QC so can't save results", ""
Else
Reporter.ReportEvent micDone, "Attachment Saved to QC curent run", strFileName
Set Attlist = attachment.NewList("")
Set Att = attachment.AddItem(Null)
att.FileName = strFileName
att.Type = 1
att.Post
att.Save False
End If
Else
Reporter.ReportEvent micWarning, "No connection", "Not connected to Quality Center"
End If
On error goto 0
No comments:
Post a Comment