|VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month.|
OutlookÂ´s junk filter doesn`t recognize all junk emails. This macro is just one sample for how to look at the properties of an incoming email and then move the email immediately to the junk folder.
In this sample we first check whether or not the email has at least one attachment. If thatÂ´s the case, we check if the subject and also the body of the email are empty. Only if thatÂ´s also the case, the email is moved to the junk folder.
Private WithEvents m_Inbox As Outlook.Items Private Sub Application_Startup() Set m_Inbox = Application.Session.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub m_Inbox_ItemAdd(ByVal Item As Object) Dim Spam As Outlook.Folder If Item.Attachments.Count>0 Then If Item.Subject = "" and Item.Body = "" Then Set Spam = Application.Session.GetDefaultFolder(olFolderJunk) Item.Move Spam Endif Endif End Sub
|Determine the "identity" of your emails. Set with SAM the sender and the folder folder for sent items with the help of rules.|