Alert message every hour based on type/number of mail messages

M

masani paresh

Hi,

Is there any outlook setting to check email every hour, but alert me on any
high priority messages in between? If there is no rules to do this then is it
possible to write a macro/Add-in such that it sould alert me every hour about
nember of mails received and alert me in between if some high priority mail
arrived.
 
K

Ken Slovak - [MVP - Outlook]

How would it be possible to know about high priority messages without
checking for them? If you do a send/receive every hour that's how long it
would be before that could be discovered.
 
M

masani paresh

Thanks Ken for reply.
checking for them?
We definately need to check that when mail received. I could think of way.
Do we have something likde Item_Received event? If yes then I can maintain
counter in some file or global variable which keep increase when new email
received and every hour I can pop up message box saying XXX number of emails
received in last hour. For High priority we can check Email Item
property(though I dont know whether it is available or not). I think now you
got the purpose. Could you help me now. I think I have two questions here:
1. Item_Received event is there or not?
2. Item.Priority : something like this is available or not.

Thanks,
Paresh


Ken Slovak - said:
How would it be possible to know about high priority messages without
checking for them? If you do a send/receive every hour that's how long it
would be before that could be discovered.
 
K

Ken Slovak - [MVP - Outlook]

The property you would check would be item.Importance. If the value of that
property is OlImportance.olImportanceHigh it is high importance.

You can handle the ItemAdd() event on the Items collection of the Inbox, or
you can use Application.NewMail() or Application.NewMailEx(). Any of the
normal Exchange events such as ItemAdd() won't fire if more than 15 items
arrive at once, or if your code takes too long to handle a preceding
ItemAdd() event. That's an Exchange limitation. NewMail() only fires at
intervals and can miss items, so your best bet is to use NewMailEx() which
provides a delimited list of EntryID's of items that arrived since the
previous NewMailEx() event fired.
 
M

masani paresh

Thanks Ken for reply. I have declared below sub routine but it is not
working. Could you please tell me correct prototype.

Private Sub Application_NewMailEx(ByVal Item As Object)
MsgBox "here it is"
End Sub
 
K

Ken Slovak - [MVP - Outlook]

It's shown in the Object Browser, along with the signatures of every other
Outlook method, property and event. You really need to know how to use the
Object Browser for any type of programming.

For NewMailEx the signature is NewMailEx(EntryIDCollection As String).
 
M

masani paresh

Thanks Ken. Got it. Going forward I will use Object Browser a lot.

--
Thanks,
Paresh


Ken Slovak - said:
It's shown in the Object Browser, along with the signatures of every other
Outlook method, property and event. You really need to know how to use the
Object Browser for any type of programming.

For NewMailEx the signature is NewMailEx(EntryIDCollection As String).
 

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