4 replies
by jorozco
by topwop
jorozco I am not sure what exactly it is you are looking to find, however here is a basic way to list messages from the inbox for example. If you want to get something from another folder like from deleted items then simply change the olFolderInboxto olFolderDeleted. make a form with a list box and add this code belowto see what I mean.
Dim objOutlook As New Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objInbox As MAPIFolder
Dim objMail As MailItem
'Get the MAPI reference
Set objNameSpace = objOutlook.GetNamespace("MAPI")
'Pick up the Inbox
Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox)
'Loop through the items in the Inbox
For Each objMail In objInbox.Items lstFolders.AddItem objMail.Subject
Next objMail
by jorozco
by jorozco
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending