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

  • Thread starter Ken Slovak - [MVP - Outlook]
  • Start date
Status
Not open for further replies.
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
 
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


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


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
V Your Imap server wants to alert you to the following: Message too large Using Outlook 4
J Calendar events created on iPhone automatically changing default alert from 'None' to 'Time of Event' Using Outlook.com accounts in Outlook 0
A Macro Mail Alert Using Outlook 4
J Is it no longer possible to suppress Outlook 2019 Invalid Certificate name mismatch security alert via Registry? Using Outlook 1
J Problem with Outlook 2016 new mail tray icon alert (envelope in the systems tray) Using Outlook.com accounts in Outlook 0
M 3rd Party Certificate now Security Alert Exchange Server Administration 2
P Use VBA to alert if new incoming email fits criteria Outlook VBA and Custom Forms 0
K IMAP Server Wants to alert you to the following: cannpt rename system folder Using Outlook 1
P How to make outlook display alert appear on top of other windows whenever a new email is received? Outlook VBA and Custom Forms 1
S Shared Mailbox Alert Outlook VBA and Custom Forms 7
J Your IMAP server wants to alert you to the following: cannot remove system folder Using Outlook 3
S Different alert time for different meetings Using Outlook 1
C Need rule to alert when an email has not been replied to within 24 hours Using Outlook 1
J Create Calendar Alert Event form Mail Subject line? Using Outlook 4
O Your IMAP server wants to alert you to the following: Cannot delete folder with subfolders. Using Outlook 4
B "Your IMAP server wants to alert you to the following: cannot move folder into itself" Using Outlook 3
R PST Size Alert Using Outlook 4
R Notification/alert when an email has been sat in inbox for a set period of time Using Outlook 1
A Creating rule to create week folder and transfer mail using alert Using Outlook 3
P Macro/Alert for unreceived email Outlook VBA and Custom Forms 1
B Your IMAP server wants to alert you to the following: cannot rename system folders Using Outlook 8
L IMAP server wants to alert you to the following: cannot rename sytem folders Using Outlook 14
B IMAP server wants to alert you to the following cannot rename system folders Using Outlook 3
J Text alert when someone specific emails me Using Outlook 1
L Multiple mailbox incomign alert Using Outlook 2
M Outlook 2010 no alert for new headers Using Outlook 1
F Can I write a macro that triggers off an Outlook alert Outlook VBA and Custom Forms 1
W Outlook Desktop alert, notification, popup - turn off programattic Outlook VBA and Custom Forms 1
N Outlook alert/memo/rule when an email does not arrive Using Outlook 3
H Outlook 2003 alert problem Outlook VBA and Custom Forms 2
D Outlook 365 Outlook Message "Cannot be sent because the message has changed" Using Outlook 0
B Please remind me how I added this message button Outlook VBA and Custom Forms 0
E PgUp and PgDn don't work for displayed message content (but do for web pages) Using Outlook 4
M A plug in (or method) to keep email message formatting after it expires Using Outlook 1
Rob Can't save MailItem because the message changed in .pst file Outlook VBA and Custom Forms 0
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 6
Kika Melo How to mark as Junk any message not from Contacts (in Outlook.com) Using Outlook 3
G Outlook 365 My iCloud Outlook doesn’t work after reinstalling Microsoft365 on Windows 10 PC – now I get error message on contacts and calendar Using Outlook 1
G Get current open draft message body from VBA Outlook VBA and Custom Forms 1
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
F Outlook 2019 Forwarding Message and Keeping Unread Status Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
C Populate form data into message body Outlook VBA and Custom Forms 1
J Outlook 365 Add keywords from Listbox to the message body where cursor is placed Outlook VBA and Custom Forms 0
B How to create a button that sorts and selects the most recent message with ONE click Using Outlook 2
P "Item could not be moved" message occurs frequently for IMAP inbox, Office 365 Using Outlook 0
A rule name into message - how? Outlook VBA and Custom Forms 5
A Links in email getting error message about group policy Using Outlook 4
O How to find and replace a word in Outlook-Agenda-Subject and Message? Using Outlook 0

Similar threads

Back
Top