try this:
' Adds file to attachment of the associated test in the test lab
' Parameter aFileName: file name including absolute path
Sub AddAttachToTDRun(aFileName)
'Check if attaching files is enabled
it may be helpful to call this with a bussiness component if you use them.
' Adds file to attachment of the associated test in the test lab
' Parameter aFileName: file name including absolute path
Sub AddAttachToTDRun(aFileName)
'Check if attaching files is enabled
Code:
if LCase(GetLocalParameter("bpt.attach")) = "true" Then
Dim TDrun, attf, att
Set TDrun =TDUtil.CurrentRun
Set attf = TDrun.Attachments
Set att = attf.AddItem(Null)
att.FileName = aFileName
att.Type = 1
att.Post
att.Save False
LogValue "File attached", aFileName
Else
LogValue "File not attached", aFileName
End If
End Subit may be helpful to call this with a bussiness component if you use them.

