Solved

Outlook 2010 Custom Rules

Posted on 2010-11-20
3
821 Views
Last Modified: 2012-05-10
Hello,

I would like to setup a couple of custom rules in Outlook 2010 and I'm not sure how to do it.

Here are the rules

1. If there is no subject, put email into folder \Suspicious

2. If the body of the email is a hyperlink and nothing but a hyperlink then put in folder \Suspcious
0
Comment
Question by:tatton777
3 Comments
 
LVL 76

Expert Comment

by:David Lee
Comment Utility
Hi, tatton777.

The second rule isn't possible with Outlook alone.  Outlook does not have a rule option for doing this.  It might be possible with a bit of scripting in concert with a rule.  I don't think the first rule can be done with Outlook alone either, but it can be done with a bit of scripting and a rule.  I can provide the script and instructions for using it if you want to go with this approach.
0
 
LVL 14

Expert Comment

by:BigBadWolf_000
Comment Utility
For 1) you can try this....
Apply this rule afer message arrives
Where my name is in the to or cc box
Move it to the Suspicious folder
Except if the subject contains 'a' or 'e' or 'i' or 'o' or 'u' or 'f' or 'w'

 If you dont want emails with FW: in the subject line included remove the 'f' or 'w'

For 2) you can try "with spaecific words in body" and include http://
and Move it to the Suspicious folder



0
 
LVL 13

Accepted Solution

by:
gbanik earned 500 total points
Comment Utility
The only way you can achieve all of this is through VBA... attached is the code to do so.

FYI, for adding the code to your Outlook project,
1. Click Tools > Macro > Visual Basic Editor
2. Expand Microsoft Office Outlook Objects and click on ThisOutlookSession
3. Copy the code and paste it into the Outlook's VB Editor window
4. Save the code from the Toolbar Save button.
5. Wait for a mail :)
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
    Dim varEntryIDs
    Dim objItem As MailItem
    Dim objNS As NameSpace
    Dim oFolder As Folder
    
    Set objNS = Application.Session
    Set oFolder = objNS.Folders("Personal Folders").Folders("Suspicious")
    
    Dim i As Integer
    varEntryIDs = Split(EntryIDCollection, ",")
    For i = 0 To UBound(varEntryIDs)
        Set objItem = objNS.GetItemFromID(varEntryIDs(i))
        If TypeName(objItem) = "MailItem" Then
            objItem.Move oFolder
        End If
    Next
End Sub

Open in new window

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

My experience with Windows 10 over a one year period and suggestions for smooth operation
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now