DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Sub OUTLOOK_GELEN_KUTUSU_MAIL_LİSTESİ()
'Kodun çalışması için referanslardan Microsoft Outlook [COLOR=red]11.0[/COLOR] Object Library seçeneğini aktif yapınız.
Dim Outlook_Uygulaması As Outlook.Application
Dim Outlook_Mapi As Outlook.Namespace
Dim Gelen_Kutusu As Outlook.MAPIFolder
Dim Gelen_Mail As Outlook.MailItem
Dim Satır As Long
Set Outlook_Uygulaması = New Outlook.Application
Set Outlook_Mapi = Outlook_Uygulaması.GetNamespace("MAPI")
Set Gelen_Kutusu = Outlook_Mapi.GetDefaultFolder(olFolderInbox)
Sheets("Sayfa1").Cells.Clear
Satır = 1
Cells(Satır, 1) = "KİME"
Cells(Satır, 2) = "BİLGİ"
Cells(Satır, 3) = "KONU"
With Range("A1:C1")
.Font.Bold = True
.Font.ColorIndex = 3
End With
If Gelen_Kutusu.Items.Count = 0 Then
MsgBox "Gelen Kutusunda mail bulunamadı !", vbExclamation
Exit Sub
End If
For Each Gelen_Mail In Gelen_Kutusu.Items
DoEvents
With Gelen_Mail
Satır = Satır + 1
Cells(Satır, 1) = .To
Cells(Satır, 2) = .CC
Cells(Satır, 3) = .Subject
End With
Next
Set Gelen_Mail = Nothing
Set Gelen_Kutusu = Nothing
Set Outlook_Mapi = Nothing
Set Outlook_Uygulaması = Nothing
MsgBox "Gelen Kutusundaki mail adresleri listelenmiştir.", vbInformation
End Sub