+ Reply to Thread
Results 1 to 4 of 4

Outlook VBA: Listen for new emails and trigger popup Msgbox

  1. #1
    Registered User
    Join Date
    03-20-2018
    Location
    Singapore
    MS-Off Ver
    Office 365 Excel 2016
    Posts
    62

    Lightbulb Outlook VBA: Listen for new emails and trigger popup Msgbox

    Hi, I intend to trigger some code immediately upon receipt of a new email in Outlook.

    I am following the code exactly word for word as written in this website:
    https://www.tachytelic.net/2017/10/h...ed-in-outlook/

    This should be the basis for me to edit and run more complex code segments

    But even with this basic code demo, the new email event listener does not work.

    I restarted Outlook a few times and sent the email to my Outlook inbox again and again

    Any idea why this code isn't working?

  2. #2
    Forum Contributor
    Join Date
    03-08-2018
    Location
    Denmark
    MS-Off Ver
    2016 for Windows
    Posts
    346
    Quote Originally Posted by Cheesecube View Post
    Hi, I intend to trigger some code immediately upon receipt of a new email in Outlook.

    I am following the code exactly word for word as written in this website:
    https://www.tachytelic.net/2017/10/h...ed-in-outlook/

    This should be the basis for me to edit and run more complex code segments

    But even with this basic code demo, the new email event listener does not work.

    I restarted Outlook a few times and sent the email to my Outlook inbox again and again

    Any idea why this code isn't working?
    Just following this, as I also have tried this.

  3. #3
    Forum Contributor
    Join Date
    03-08-2018
    Location
    Denmark
    MS-Off Ver
    2016 for Windows
    Posts
    346

    Re: Outlook VBA: Listen for new emails and trigger popup Msgbox

    I do hope there is someone that can help with this or guide to a place that can

  4. #4
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,858

    Re: Outlook VBA: Listen for new emails and trigger popup Msgbox

    Hi Cheesecube,

    The code in the website you referenced worked for me in Outlook 2016 exactly as is with no modifications.

    Try again:
    a. Open Outlook VBA (Alt F11 or equivalent).
    b. Expand 'Microsoft Outlook Objects' if necessary.
    c. 'Left Click' ThisOutlookSession. 'ThisOutlookSession (Code)' will be displayed at the top.
    d. Cut and paste the code from the website.
    e. Close Outlook. Select 'Yes' when asked do you want to save the project.
    f. Open Outlook.
    g. Select the Inbox for the Primary Email Account in Outlook (not required - but useful for test purposes).
    h. Have someone send you an eMail (or send yourself an email from another computer).
    i. Wait for the next Email to arrive at the Inbox. A MsgBox will be displayed at the same time (which is generated by the code you added).

    If this does not work, verify that the code exists in the ThisOutlookSession Code Module.

    Good luck.

    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Outlook VBA needed for Counting emails in outlook by specific date
    By Marijke in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 07-12-2017, 10:12 AM
  2. Track Outlook Emails - sent emails in Excel
    By baluraipur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2015, 09:18 AM
  3. MsgBox Popup
    By swalsh^s96 in forum Excel General
    Replies: 7
    Last Post: 11-27-2015, 02:01 PM
  4. [SOLVED] Sending Outlook emails from Excel; Limits to three emails only?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2013, 06:53 AM
  5. Send outlook emails with message in cells to individual emails associated with them
    By abinayan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2011, 06:11 AM
  6. Excel 2007 : msgbox popup in vba
    By ag23035 in forum Excel General
    Replies: 2
    Last Post: 03-07-2011, 08:37 PM
  7. How to popup msgbox in this
    By vumian in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-31-2006, 12:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1