Creating custom rule to move if "NAME" is in body but ignore the phrase "Hi NAME" in the search

Status
Not open for further replies.

Sara

New Member
Outlook version
Outlook 2013 64 bit
Email Account
POP3
I am trying to organize my emails from our project management system. The emails go out to all people in the project and are personalized to each person in the body of the email by saying "Hi NAME". If the message requires action from you then your name will be somewhere else in the body.

I am trying to create a rule that states

When emails come from "..."
Which include "NAME" in the body
Move to "FOLDER"
Ignore the phrase "Hi NAME" at the beginning

What I'm finding is that it can't exclude the phrase "Hi NAME" as it has "NAME" in it. and so moves everything from the project management system.

Is anyone able to help please? Sadly I don't have programming knowledge.

Thanks
 

Forum Admin

Senior Member
a run a script rule should work fine. Maybe this - it won't start looking until the 6th character (can be increased) and if it finds a match, it will move the message.

Sub MoveMail(Item As Outlook.MailItem)
If InStr(6, Item.Body, "Name") > 0 Then
item.Move Session.GetDefaultFolder(olFolderInbox).Folders("subfolder-name")
End If

End Sub

More info on using run a script rules: http://www.slipstick.com/outlook/rules/outlooks-rules-and-alerts-run-a-script/
 

Sara

New Member
Outlook version
Outlook 2013 64 bit
Email Account
POP3
Hi, thanks for your help. I have done the following an am still having trouble. Can you please have a look. Thanks

upload_2014-4-17_14-34-13.png


upload_2014-4-17_14-35-22.png
 
Status
Not open for further replies.
Top