Rule to select incoming messages by contact category

Status
Not open for further replies.
L

lemon scented

Hi

I would like to set up a rule that sends incoming messages to the same specified folder. The messages would be selected based on the contact category of the sender.

Is it possible to set up a rule based on the category of the contact? If so, how? If not, any suggestions for how to do this?

I would initially have around 50 contacts in this category and will keep adding them at the rate of around 5-10 a day.

I tried to do this with a distribution list but the list disappeared (it wasn't in deleted items) and DLs don't work well with rules anyway.

Thank you.
 
H

Hassan El-Meligy, MSc

the DL issue would have been a salvation. you can try to do this using the SCRIPT mentioned in the rules to write a script that checks the category that you have already specified in your contact

Regards
 
R

Russ Valentine

The Rules Wizard allows you to select Category of the sender as a criterion for moving a message to a folder. Should be right in front of you. You've asked this question before. Can you not see it? " Apply this rule after the message arrives assigned to the <pick your category> and move it to the <pick your folder> folder. " Russ Valentine
 
L

lemon scented

Hi Russ,

I am asking about applying the rule to the email address, not the message. The whole point is to have this done automatically so I don't want to have to assign categories to all of these incoming messages. I want them to go to the correct folder automatically, based on the address.

The rule that you quote appears to apply to the message, not the address. I tested it and found that appears to be the case. If it is based on the category of the sender, would it not say so? It could certainly be more clearly written!

I thought this would be a more appropriate forum to ask this question.

Thank you.
 
L

lemon scented

Hi Hassan,

Not sure what you mean about the script mentioned in the rules. Could you please be more specific?

Thank you.

Cathy
 
R

Russ Valentine

We've been through this once before. Nothing has changed since then.Russ Valentine
 
L

lemon scented

Not trying to annoy you. Just want to be sure that there is, indeed, no way to do what should be a simple task.
 
R

Russ Valentine

As I pointed out the last time, what you want to do is more within the realm of CRM software. Outlook was not designed for CRM capabilities.Russ Valentine
 
H

Hassan El-Meligy, MSc

Hi Hassan,

Not sure what you mean about the script mentioned in the rules. Could you please be more specific?

Thank you.

Cathy

In the Rule Action window (the second)

There is the part Run Script

The Run Script Part will enable you to run a Macro that you have developed in the Macro part

Using the Macro Script and the Rule you can do more with Actions.

Regards
 
L

lemon scented

Thank you.

Please clarify what to select in the Select Condition step. I want a rule to select by contact category but that is not an option in the list. So, what do I choose?

I am not sure what the Macro Script would do.

Cathy
 
H

Hassan El-Meligy, MSc

Cathy,

The following link will show exactly what you need to do, the SCRIPT option will allow you to do more with the RULES.

http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/A_420-Extending-Outlook-Rules-via-Scripting.html

You may also create a VBA (without having to go through the rules) to test each and every email coming and perform a certing aciton like moving received mail item to a folder or forwarding it to someone based on other criteria that is not available in the normal main menu.

Please look at the link and read through.

 
H

Hassan El-Meligy, MSc

Cathy,

The following is a (bit) modified to your situation (you would find relevant resoruces on the net too

http://www.outlookcode.com/codedetail.aspx?id=1610)

Sub MarkWithContactCategories(myMail As Outlook.MailItem)
Dim strID As String
Dim objNS As Outlook.NameSpace
Dim objMsg As Outlook.MailItem
Dim objRecip As Outlook.Recipient
Dim objAE As Outlook.AddressEntry
Dim objContact As Outlook.ContactItem
Dim strCats As String
Dim strMsgCats As String
Dim arrCats() As String
Dim i As Integer
On Error Resume Next
strID = myMail.EntryID
Set objNS = Application.Session
Set objMsg = objNS.GetItemFromID(strID)
Set objRecip = _
objNS.CreateRecipient(objMsg.SenderEmailAddress)
If objRecip.Resolve Then
Set objAE = objRecip.AddressEntry
Set objContact = objAE.GetContact
If Not objContact Is Nothing Then
strCats = objContact.Categories
strMsgCats = objMsg.Categories
MsgBox strCats
MsgBox strmsgcars
If strCats <> " " Then
arrCats = Split(strCats, " ," )
For i = 0 To UBound(arrCats)
If Not IsInCategories _
(arrCats(i), strMsgCats) Then
objMsg.Categories = _
objMsg.Categories & _
" ," & arrCats(i)
End If
Next
objMsg.Save
End If
End If
End If
Set objMsg = Nothing
Set objNS = Nothing
Set objAE = Nothing
Set objRecip = Nothing
Set objContact = Nothing

End Sub

Function IsInCategories(strCatName, strCatList)
Dim arrCats() As String
Dim i As Integer
If strCatList <> " " Then
arrCats = Split(strCatList, " ," )
For i = 0 To UBound(arrCats)
If UCase(arrCats(i)) = UCase(strCatName) Then
IsInCategories = True
Exit For
End If
Next
End If

End Function

Hassan
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
1 Incorrectly Setup a Rule at Domain level to not allow address from outside domain Exchange Server Administration 2
J Transport Rule to detect Keyword question.. Exchange Server Administration 2
T "Words In Recipient's Address" Rule Causes Outlook To Stop Processing Rules Using Outlook 3
R Outlook Autoforward rule do not work for NDR messages Using Outlook 1
R Setup autofoward rule on a particular folder in Outlook Using Outlook 0
N Rule for "on behalf of" - with changing names Using Outlook 2
S Unable to remove rule outlook 2010 Using Outlook 0
O Outlook 2016 This rule will only run when you check your email in Outlook.... Using Outlook 4
Nadine Rule to move attachments with specific name Outlook VBA and Custom Forms 1
N Outlook Email Rule execution through shortcut keys (VBA codes) Using Outlook 1
dweller Outlook 2010 Rule Ignores VBA Script Outlook VBA and Custom Forms 2
O Rule to move (specific) messages from Sent folder to Specific folder Using Outlook 1
S Adding new Exchange (2016) rule very slow down Microsoft Outlook Exchange Server Administration 0
B Outlook rule run a Script doesn't work Outlook VBA and Custom Forms 1
K VBA BeforeItemMove event create rule to always move to its folder. Outlook VBA and Custom Forms 4
icacream Rule based on sender / wrong sender sent to folder Using Outlook 7
Bri the Tech Guy Run Script rule not running for newly arriving messages Outlook VBA and Custom Forms 25
L Making rule to move email to folder from one O365 domain Using Outlook 1
J Assess content of User Defined Field in Rule Using Outlook 3
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1
A Change order of actions in one (!) rule Outlook VBA and Custom Forms 2
J HELP- Rule to auto strip prepend from external emails Using Outlook 0
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
A rule to flag messages not working Using Outlook 5
Brian Murphy Exchange Online Everything a Transport Rule should do and cannot Exchange Server Administration 1
J Outlook Rules - Changing auto-submit address in multiple rules, according to rule name Outlook VBA and Custom Forms 0
A saving attachement to folder named the same as rule name Outlook VBA and Custom Forms 0
Jennifer Murphy Can I create a Rule with Or'd conditions? Using Outlook 1
A Rules - how to determine if all conditions in rule are true or false Outlook VBA and Custom Forms 5
Vijay Error in rule- Run a script Using Outlook 1
Ascar_CT Rule behavior analysis - any tools available? Using Outlook 0
Liza Creating a rule in outlook to filter messages Using Outlook 0
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
M VBA Rule for removing all body but hyperlink then forwarding Outlook VBA and Custom Forms 9
B custome rule Outlook VBA and Custom Forms 2
Diane Poremsky Mark Sent Items as Read After Copying with a Rule New Slipstick.com Articles 0
Diane Poremsky Run a Script Rule: Send a New Message when a Message Arrives New Slipstick.com Articles 2
T Create Rule For Secondary E-Mail Address In Outlook 2016 Using Outlook 4
B Macro To Create Rule To Export From Certain Folder Email Information in one workbook multiple sheets Outlook VBA and Custom Forms 0
C Rule To Save attachments on receipt of email Outlook VBA and Custom Forms 2
Diane Poremsky Create a Task from an Email using a Rule New Slipstick.com Articles 0
ashcosta2 Auto Reply rule based on speficied time Outlook VBA and Custom Forms 0
M Rule option Using Outlook 2
L Run a Script Rule doesn't work Using Outlook 5
O VBA rule on multiple computers using shared mailbox Outlook VBA and Custom Forms 1
J Transactional emails - mail rule Using Outlook 3
M Question: Is there a rule that will save email in Windows Explorer Outlook VBA and Custom Forms 3
S Merge Emails with attachments with inbox rule to forward Using Outlook 5
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
S using script rule to save attachments on arrival Outlook 2010 Outlook VBA and Custom Forms 9
Similar threads


















































Top