Hi All,
I have the following code that gives me a msgbox with the person who's e-mailing me when i receive new mail. My problem is that i get a "you have new mail" after my own msgbox - is there any way to turn this off programmatically ?
Private Sub Application_NewMail()
Dim objItem As Outlook.MailItem
Set objItem = Application.GetNamespace ("MAPI"
.GetDefaultFolder(olFolderInbox).Items(1)
Response = MsgBox("You have new mail from " & objItem.SenderName, vbYesNoCancel)
If Repsonse = vbYes Then
MsgBox " Read Mail"
ElseIf Response = vbNo Then
MsgBox " Delete Mail"
Else
MsgBox " Cancel clicked"
End If
End Sub
I have the following code that gives me a msgbox with the person who's e-mailing me when i receive new mail. My problem is that i get a "you have new mail" after my own msgbox - is there any way to turn this off programmatically ?
Private Sub Application_NewMail()
Dim objItem As Outlook.MailItem
Set objItem = Application.GetNamespace ("MAPI"
Response = MsgBox("You have new mail from " & objItem.SenderName, vbYesNoCancel)
If Repsonse = vbYes Then
MsgBox " Read Mail"
ElseIf Response = vbNo Then
MsgBox " Delete Mail"
Else
MsgBox " Cancel clicked"
End If
End Sub