Re: Server rules in outlook
Welcome to the Forums.
Moved to General PC :)
Are you wanting to write VBA code or just write a rule using the wizard to do this?
Re: Server rules in outlook
anything that solves my problem.
Re: Server rules in outlook
I use VBA code instead of Rules. It gives me more control but it means that its only for the particulat machine.
Make sure you enable macros to run usually by setting macros to medium and choosing enable when you restart Outlook. Then press Alt+F11 to open the Outlook VBA IDE. Then paste this code in and make the only change to your folder location.
Note: If your folder is a subfolder then you need to drill down the folder path to its final location. You can not go ".Folders("Test1\Test2\Test3").Items" :)
VB Code:
Option Explicit
''Behind ThisOutlookSession
Private WithEvents oMyFolder As Outlook.Items
Private Sub Application_MAPILogonComplete()
Set oMyFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders("Test").Items
End Sub
Private Sub oMyFolder_ItemAdd(ByVal Item As Object)
MsgBox "New message:" & vbNewLine & Item.Subject, vbOKOnly + vbInformation, "New item added to your MyFolder folder!"
End Sub