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

  • Thread starter Ken Slovak - [MVP - Outlook]
  • Start date Views 1,652
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.

"masani paresh" <masanip@deshaw.com> wrote in message

news:9FAD1E84-E71B-49B8-BF6A-F642A0C9B914@microsoft.com...
> Thanks Ken for reply.
>
> >>How would it be possible to know about high priority messages without

> 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
 
B

bWFzYW5pIHBhcmVzaA

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

Thanks,

Paresh
wrote:


> 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.

> >

>

> "masani paresh" <masanip@deshaw.com> wrote in message
> news:9FAD1E84-E71B-49B8-BF6A-F642A0C9B914@microsoft.com...
> > Thanks Ken for reply.
> >
> >>>How would it be possible to know about high priority messages without

> > 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


>
 
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).

"masani paresh" <masanip@deshaw.com> wrote in message

news:7D47C2DB-8B3B-4417-8CC1-304DD3C24032@microsoft.com...
> 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

> > Thanks,
> Paresh
 
B

bWFzYW5pIHBhcmVzaA

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

Thanks,

Paresh
wrote:


> 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).

> >

>

> "masani paresh" <masanip@deshaw.com> wrote in message
> news:7D47C2DB-8B3B-4417-8CC1-304DD3C24032@microsoft.com...
> > 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
> > > > Thanks,
> > Paresh


>
 

Top