This example should get your close. You may need to make some slight adjustments.
Dim qcServer, qcDomain, qcProject, qcUser, qcPassword
qcServer = ''http://YOUR_SERVER:8080/qcbin/''
qcDomain = ''DEFAULT''
qcProject = ''BLANK_PROJECT''
qcUser = ''alex_alm''
qcPassword = ''''
'Create the TD Connection object
Set tdc = CreateObject(''tdapiole80.tdconnection'')
'Initialize the connection and log in to the project
tdc.InitConnectionEx qcServer
tdc.Login qcUser, qcPassword
tdc.Connect qcDomain, qcProject
'If connection is established...
If tdc.Connected = True Then
'Create the TestFactory object
Set TestFact = tdc.TestFactory
'Filter the Tests in a specific folder and create a list.
Set TestFilter = TestFact.Filter
TestFilter.Text = ''{TableName:TEST, ColumnName:TS_SUBJECT, LogicalFilter: 0000016^SubjectTestTest123^, VisualFilter: 0000016^SubjectTestTest123^, NO_CASE: }''
TestFilter.Filter(''TS_ID'')
Set TestList = TestFilter.NewList()
'Iterate through the Test list.
For Each Test in TestList
'If the Test has attachment(s)...
If Test.HasAttachment = True Then
'Filter the attachments and create a list.
Set AttachFact = Test.Attachments
Set AttachFilter = AttachFact.Filter
Set AttachList = AttachFilter.NewList()
'Iterate through the Attachment list.
For Each Attach in AttachList
'Get the storage object for the attachment.
Set AttachStor = Attach.AttachmentStorage
'Set the download path.
AttachStor.ClientPath = ''C:sample'' & Test.ID
'Download the attachment.
AttachStor.Load
'Kill the storage object.
Set AttachStor = Nothing
Next
'Kill the attachment factory, list, and filter objects.
Set AttachList = Nothing
Set AttachFilter = Nothing
Set AttachFact = Nothing
End If
Next
'Kill the Test Factory and filter objects.
Set TestFilter = Nothing
Set TestList = Nothing
Set TestFact = Nothing
'Notify the user.
MsgBox ''Download Complete.''
End If
'Disconnect from the project and logout of QC
tdc.Disconnect
tdc.Logout
'Kill the connection object
Set tdc = Nothing