Consulting

Results 1 to 2 of 2

Thread: Macro/Alert for unreceived email

  1. #1
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    1
    Location

    Macro/Alert for unreceived email

    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:

    1. If I received the email from abc by 1PM, DO NOTHING.
    2. If I do not receive an email from abc for whatever reasons, by 1PM, is there a way outlook can
      1. Send me an email with subject "No email received from ABC for Lunch" ?
      2. Generate a pop up/alert which will have "No email received from ABC for Lunch" in the alert.
      3. 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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •