We have a code that displays all the emails in Outlook 2007.
We want to also display the folder where its saved and also the category that is assign,
How can we incorporate this in our app?
(Included is part of the code, its in VB6)
Sub ProcessStore(olkFld As Object)
Const olMailItem = 0
Const olMail = 43
Dim olkItm As Object, olkSub As Object, olkAtt As Object
If olkFld.DefaultItemType = olMailItem Then
For Each olkItm In olkFld.Items
If olkItm.Class = olMail Then
strBuffer = strBuffer & x & " - " & sp _
& olkItm.SentOn & sp & olkItm.ReceivedTime & sp & olkItm.SenderName & sp _
& olkItm.Subject & sp & olkItm.to & sp & olkItm.Body & vbCrLf
'Display and export
Print #2, strBuffer
strBuffer = ""
For Each olkSub In olkFld.Folders