Kemal Demir
Özel Üye
- Katılım
- 29 Temmuz 2004
- Mesajlar
- 2,108
Outlook'umuza kayıtlı mailleri Listbox'a nasıl ekleyebiliriz.Yada ekleme imkanımız varmıdır arkadaslar.Bu konuda bilgi sahibi olan kişiler yardımcı olabilirmi.
Sub ListeAl()
Dim MyOutlook As Outlook.Application
Dim objContact As ContactItem
Dim NS As NameSpace
Dim i As Long
Set MyOutlook = New Outlook.Application
Set NS = MyOutlook.GetNamespace("MAPI")
'Set MyFolder = NS.Folders("Personal Folders").Folders("Contacts").Folders("OZEL")
Set MyFolder = NS.Folders("Kişisel Klasörler").Folders("Kişiler")
Set myitems = MyFolder.Items
For Each objContact In myitems
i = i + 1
With objContact
Cells(i, 1) = .FullName
Cells(i, 2) = .Email1Address
Cells(i, 3) = .CompanyName
Cells(i, 4) = .BusinessTelephoneNumber
Cells(i, 5) = .MobileTelephoneNumber
Cells(i, 6) = .HomeTelephoneNumber
End With
Next objContact
Set NS = Nothing
Set MyFolder = Nothing
Set myitems = Nothing
Set MyOutlook = Nothing
End Sub
Set NewMail = MyInbox.Items(i)
MySh.Cells(i, 1) = NewMail.SenderName
MySh.Cells(i, 2) = NewMail.ReceivedTime
MySh.Cells(i, 3) = NewMail.Subject
[b]' MySh.Cells(i, 4) = NewMail.[/b]
Kalın belirtiğim sırada . Sonrasındaki prosedur ne olması gerekir ki kişinin kullanılabilir mail adresi görünsün.