Good afternoon.
I have located a bit of code that produces a pop up message when an email is moved to a particular sub folder of a shared mailbox.
This message pops up everytime an email is moved, however, I would like it to only pop up if the email is in a certain category.
The code so far is (thanks to Steiner):
Option Explicit
Private Fold1 As Outlook.MAPIFolder
Private WithEvents colItems1 As Outlook.Items
Private Sub Application_Startup()
'Insert the folder names here!
Set Fold1 = Application.GetNamespace("MAPI").Folders("TECHNOLOGY ITD ITCS NEE Team").Folders("Inbox").Folders("Work In Progress")
Set colItems1 = Fold1.Items
End Sub
Private Sub colItems1_ItemAdd(ByVal Item As Object)
MsgBox "New mail from " & Item.SenderName & " in " & Fold1.Parent.Name
End Sub
Private Sub Application_Quit()
'Clean Up
Set Fold1 = Nothing
Set colItems1 = Nothing
End Sub