Check your Outlook Inbox for new messages
Checks you Microsoft Outlook Inbox for new Mail Items. Original Author: Tim Ford Assumptions Need to set “References” to Microsoft Outlook. Returns The number of new messages Code Dim objOutlook As Outlook.ApplicationDim objMapiName As Outlook.NameSpaceDim intCountUnRead As IntegerPrivate Sub Check_Mail_Click()Set objOutlook = New Outlook.ApplicationSet objMapiName = objOutlook.GetNamespace(“MAPI”) For I = 1 To objMapiName.GetDefaultFolder(olFolderInbox).UnReadItemCount intCountUnRead = intCountUnRead + 1 Next… Read More »