Jump to content

Detecting new mail icon


Recommended Posts

Hi all,

Any ideas on how to pop up a message box when new mail arrives in outlook 2003.

I know a notification exists alreadty, but it wont alert for messages into another mailbox, only the main inbox.

What I was thinking was to detect when the new mail notification envelope appears and use that to trigger the message.

Any other ideas are more than welcome.

----[ SandyD ]---
Link to comment
Share on other sites

Hi all,

Any ideas on how to pop up a message box when new mail arrives in outlook 2003.

I know a notification exists alreadty, but it wont alert for messages into another mailbox, only the main inbox.

What I was thinking was to detect when the new mail notification envelope appears and use that to trigger the message.

Any other ideas are more than welcome.

You could use COM automation to remotly control Outlook and to check yourself if there is a new message in the inbox. Google: outlook 2003 automation vba

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • 4 weeks later...

A few things here.

I wish to have a notification script for my Outlook here at work. unfortunately, i think it sends the notification before it filters it, so when I get the mass spam from servers and the likes I have them filter straight to the deleted items folder. I want notifications for items that are only filtered to my inbox. I have looked through the options for any options related to this and cannot find anything other than the option to notify or not notify.

will COM objects help me solve this? how long will it take little 'ol me to learn the ins and outs of COM?

Amp Energy Drink: the official sponsor of me scripting at 2AM.

Link to comment
Share on other sites

Hi Mike,

I figured this out but not by using autoit.

You will have to write an outlook macro like below, and store it in the ThisOutSession part of the module:

Private WithEvents colItems As Outlook.Items 

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

End Sub

Private Sub Application_Startup()
  Dim oTop As Outlook.MAPIFolder
  Dim oFolder As Outlook.MAPIFolder
  Dim oNS As Outlook.NameSpace

  Set oNS = Application.GetNamespace("MAPI")

  Set oTop = oNS.Folders.Item("Mailbox - TSV IT Services")
  Set oFolder = oTop.Folders.Item("Inbox")
  Set colItems = oFolder.Items
  
End Sub

Private Sub colItems_ItemAdd(ByVal Item As Object)
    MsgBox "New Message in TSV IT Services"
End Sub

Just replace the "Mailbox - TSV IT Services" with the mailbox you want and the "Inbox" with the folder you want to monitor.

Let me know how you get on.

----[ SandyD ]---
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...