Well, you didn't mention what types of items were being flagged or in what
folder or folders, but this would work for mail items in the Inbox. This
code would be in ThisOutlookSession:
Dim WithEvents colItems As Outlook.Items
Dim oFolder As Outlook.MAPIFolder
Private Sub Application_Startup()
Dim oNS As Outlook.NameSpace
Set oNS = Application.GetNameSpace("MAPI")
Set oFolder = oNS.GetDefaultFolder(olFolderInbox)
Set colItems = oFolder.Items
End Sub
Private Sub colItems_ItemChange(Item As Object)
If Item.FlagStatus = OlFlagStatus.olFlagMarked Then
' show MsgBox here or whatever
End If
End Sub
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
wrote in message
...
snip
I just don't get how to activate that event. for example i want to
show a message box once a mail is flagged.
can you show me how?