Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Application_NewMail()
On Error GoTo Application_NewMail_Err
Dim objItem As Outlook.MailItem
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objItem = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items(1)
'Creates an instance of Outlook.
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
Select Case objItem.SenderName
Case "ThisName, Like"
'delete the new mail
End Select
Application_NewMail_Err:
Select Case Err.Number
Case 0, 13, 20
'do nothing
Case Else
MsgBox Err.Description & Err.Number
End Select
End Sub
objItem.delete