在这次考试中,我得到了草稿数据中电子邮件的“附件文件”的数量。
有没有办法在 msgbox 或组合框或任何东西中获取此文件的名称?
Private Sub CommandButton2_Click()
Dim a As Attachments
Dim myitem As Folder
Dim myitem1 As MailItem
Set myitem = Session.GetDefaultFolder(olFolderDrafts)
Dim i As Integer
For i = 1 To myitem.Items.Count
If myitem.Items(i) = test1 Then
Set myitem1 = myitem.Items(i)
Set a = myitem1.Attachments
MsgBox a.Count
End If
Next
End Sub