If MAPIsess.SessionID = 0 Then MAPIsess.SignOn() With MAPImsg .SessionID = MAPIsess.SessionID .Fetch() For i As Integer = 0 To .MsgCount - 1 .MsgIndex = i If .AttachmentCount > 0 And .MsgRead = False Then Console.WriteLine("Attachment to Download or Read: " & .MsgIndex & " >> " & .MsgDateReceived & " >> " & .MsgSubject & " >> " & .AttachmentCount) If .AttachmentCount > 0 Then If .AttachmentPathName <> "" Then Console.WriteLine(.MsgIndex & " >> " & .AttachmentName & " >> " & .AttachmentPathName) End If End If Next MsgBox("End") End With
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)