There are instances when an application involves mail delivery for certain app features. one way to automated this is to hook with Outlook and read content of mail (though I am not very comfortable with this approach anyways!)
####################################
'Get the Count of Items in Inbox
Set app = CreateObject("Outlook.Application")
Set nameSpace = app.GetNamespace("MAPI")
Set MyFolders = nameSpace.GetDefaultFolder(6)
MsgBox MyFolders.Items.Count
'Read unread items in Inbox
Set cols = MyFolders.Items
For each mail In cols
If mail.unread Then
MsgBox mail.subject
MsgBox mail.sendername
MsgBox mail.body
mail.unread=false
End If
Next
####################################
####################################
'Get the Count of Items in Inbox
Set app = CreateObject("Outlook.Application")
Set nameSpace = app.GetNamespace("MAPI")
Set MyFolders = nameSpace.GetDefaultFolder(6)
MsgBox MyFolders.Items.Count
'Read unread items in Inbox
Set cols = MyFolders.Items
For each mail In cols
If mail.unread Then
MsgBox mail.subject
MsgBox mail.sendername
MsgBox mail.body
mail.unread=false
End If
Next
####################################
Comments
Post a Comment
No spam only genuine comments :)