+ Reply to Thread
Results 1 to 6 of 6

do something when new email is received in outlook

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Question do something when new email is received in outlook

    Hi,
    Does anyone know how to have excel do something (like msgbox a message), whenever outlook receives a new email?

    I've been trying to figure this out for a while, but can't seem to get anywhere.

    Thanks in advance!

  2. #2
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315

    Re: do something when new email is received in outlook

    Add the following code to ThisOutlookSession object in Outlook. You need to reference the Microsoft Excel Object Library in Outlook.

    Please Login or Register  to view this content.
    Where MailPopup is a sub located in an open Excel workbook.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: do something when new email is received in outlook

    Thanks mojo249! I have a question: What do you mean by "need to reference the Microsoft Excel Object Library in Outlook"?

  4. #4
    Forum Contributor
    Join Date
    05-09-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    315
    Open Outlook and press Alt -F11. Select Tools --> References menu and tick the Microsoft Excel Object Library option.

    It defines the terms for referring to Excel in your code.

  5. #5
    Registered User
    Join Date
    05-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: do something when new email is received in outlook

    Thank you very much! The code works perfect!
    Just one thins: I was wondering if it's possible to display the new email subject in the message box?

  6. #6
    Registered User
    Join Date
    06-05-2012
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: do something when new email is received in outlook

    Hi everyone! Just wanted to ask if it's possible to do this but by replying to the email received? Basically what I want to do is when a specific message with a voting option arrives in my inbox, I can send an automatic reply.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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