02-05-22 07:27 PM
Answered! Go to Answer.
02-05-22 11:34 PM
Dim app = CreateObject("Outlook.Application")
Dim _nameSpace As Microsoft.Office.Interop.Outlook.NameSpace = app.GetNameSpace("MAPI")
Dim item = _nameSpace.GetItemFromID(Entry_ID)
If item Is Nothing Then Return
If Not Folder_Path.EndsWith("\") Then Folder_Path &="\"
For Each attachment As Object In item.Attachments
If (attachment.Type = 1 OrElse attachment.Type = 5 OrElse attachment.Type = 6) AndAlso attachment.FileName Like File_Pattern Then
attachment.SaveAsFile(Folder_Path & attachment.FileName)
End If
Next
02-05-22 11:34 PM
Dim app = CreateObject("Outlook.Application")
Dim _nameSpace As Microsoft.Office.Interop.Outlook.NameSpace = app.GetNameSpace("MAPI")
Dim item = _nameSpace.GetItemFromID(Entry_ID)
If item Is Nothing Then Return
If Not Folder_Path.EndsWith("\") Then Folder_Path &="\"
For Each attachment As Object In item.Attachments
If (attachment.Type = 1 OrElse attachment.Type = 5 OrElse attachment.Type = 6) AndAlso attachment.FileName Like File_Pattern Then
attachment.SaveAsFile(Folder_Path & attachment.FileName)
End If
Next
02-05-22 11:49 PM