Show Desktop Alert only for certain emails in 2003

R

RobDog888

Is there any way to get access to the desktop alert window in Outlook
2003? I only want it to display for certain email - not any spam.
Perhaps trapping an event or ??? I don't want to turn it off
completely, but I don't want it poping up all the time either.

Thanks in advance for any assistance.

:
 
R

RobDog888

Figured it out.
From M$...

"If you are using message rules and a new e-mail message is moved out
of the default account Inbox, you may not receive a Desktop Alert
notification, or the Desktop Alert notification may not appear for
the full duration of time that you configured in the settings for the
Desktop Alerts feature."

So I use VBA to move certain messages out of the Inbox when the
arrive.

Currently I am doing this for all emails without testing for type of
message, but it works. I also set the flag icon to blue to let me
know its new and mark it as read. The envelope still shows though,
which is ok.

So I just need to test for message type and move based upon custom
criteria.


Code
-------------------
Private Sub Application_NewMail()

Dim oNS As Outlook.NameSpace
Dim oInbox As Outlook.MAPIFolder
Dim oDrafts As Outlook.MAPIFolder
Dim oMSG As Outlook.MailItem

Set oNS = Application.GetNamespace("MAPI")
Set oInbox = oNS.GetDefaultFolder(olFolderInbox)
Set oDrafts = oNS.GetDefaultFolder(olFolderDrafts)

'TODO: Handel the different types of messages that
'may come into the Inbox and move only certain ones.
Set oMSG = oInbox.Items.Item(1)
oMSG.Move oDrafts
Set oMSG = oDrafts.Items.Item(1)
oMSG.FlagIcon = olBlueFlagIcon
oMSG.Save
oMSG.UnRead = False
oMSG.Move oInbox

Set oMSG = Nothing
Set oDrafts = Nothing
Set oInbox = Nothing
Set oNS = Nothing

End Su
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top