Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Outlook 2010 Custom Rules

Posted on 2010-11-20
3
Medium Priority
?
828 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 34181121
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
ID: 34183632
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 2000 total points
ID: 34183951
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

636 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