I would like to run some Outlook rule, which will be run than user moves a message from Inbox to some folder.
2 Answers
It seems I found an answer to my own question :) I have to define the following macro and do that I want in myOlItems_ItemAdd method
Public WithEvents myOlItems As Outlook.Items
Public Sub Application_Startup()
' Reference the items in the Inbox. Because myOlItems is declared
' "WithEvents" the ItemAdd event will fire below.
Set myOlItems = Outlook.Session.GetDefaultFolder(olFolderInbox).Items
Set ee = Outlook.Session.GetDefaultFolder(olFolderInbox).Folders("MyTestFolder")
Set myOlItems = ee.Items
End Sub
Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Debug.Print (Item.Subject)
End Sub
Outlook provides a predefined list of events that can trigger a rule to fire. If you cannot find one that will do what you want younare probably out of luck. While I suspect you can write your own COM plugin for this it is not for the average person.