?
Solved

Outlook 2010 Custom Rules

Posted on 2010-11-20
3
Medium Priority
?
827 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

770 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