PDA

View Full Version : Macro/Alert for unreceived email



ashwin
07-11-2014, 09:04 AM
Hello,


I have a requirement where I need outlook to alert me if I have not received a particular email at a particular time on a day(every business day)


A very basic example would be that I expect to receive an email from an address/person (abc) everyday at or before 1PM with subject line say "Lunch".


Conditions:


If I received the email from abc by 1PM, DO NOTHING.
If I do not receive an email from abc for whatever reasons, by 1PM, is there a way outlook can

Send me an email with subject "No email received from ABC for Lunch" ?
Generate a pop up/alert which will have "No email received from ABC for Lunch" in the alert.
Any other form of notification which will bring this matter to my attention.





Let me know if you have any questions/queries.
Any inputs greatly appreciated.


Thanks.

Regards,
Ashwin

westconn1
07-11-2014, 03:24 PM
if you create a task to run at 1 pm


Set itms = GetNamespace("mapi").GetDefaultFolder(olFolderInbox).Items
Set itms = itms.Restrict("[sendername] = abc and [subject] >= lunch and [senton] > '" & Format(Date, "mm/dd/yyyy") & "'")
If itms.Count = 0 Then MsgBox "no email"should find all emails from abc with lunch in the subject, sent today, if the task runs at 1pm email must have been sent before, easy enough to change the alert to email or other

test for correct result