Consulting

Results 1 to 4 of 4

Thread: How Can I Turn Off Outlook's 'New Mail Desktop Alerts' via VBA?

  1. #1
    VBAX Regular
    Joined
    Jun 2004
    Posts
    36
    Location

    How Can I Turn Off Outlook's 'New Mail Desktop Alerts' via VBA?

    Running Outlook 2003 (so why I spent 1/2 hr looking in my Office 97 Tech Ref, I'll never know).

    We have a situation where we are sending many reports via email, using an Excel macro. Sometimes, when the splitter/mailer macro is running and a new email comes in, the new mail desktop alert pops up - and crashes the Excel macro.

    This happens most often when a cluster of emails (usually 'out of office' emails) come in all at once

    I know how to turn the notifications off manually... Is there a way to turn the notifications off (and, later, back on) via VBA?

    Thx

  2. #2

    EnableEvents

    Good Afternoon.

    Theoretically, if you disable events at the start of the code and enable them again at the end of the code, you will not receive the New Mail Notification. I have not tried this yet, since it means accessing an EMail Server I don't have access to at the moment.

    [VBA]
    Application.EnableEvents = False

    ' Send EMail Messages.

    Application.EnableEvents = True
    [/VBA]

    Let me know if this works.
    Scott

  3. #3
    VBAX Regular
    Joined
    Jun 2004
    Posts
    36
    Location
    No, that only shuts events off in Excel... Outlook VBA doesn't have an 'EnableEvents' property.

  4. #4
    Other than actually turning off your notification, it doesn't seem to be a popular subject. I even when to outlookcode.com, and searched in there. I would probably pose this question there, since that website is all about outlook.
    Sorry I couldn't be much more help, maybe there is someone there that has your solution.

    There is one thing that I would do if you like, I would set up a Rule to handle the "Out of Office" replies and send them to a seperate folder within the Inbox (name it Out of Office, if you like), since the new mail notification is for the Inbox only

Posting Permissions

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