Public Sub ListRules() Dim colRules As Outlook.Rules Dim myRule As Outlook.Rule Dim myAction As Outlook.RuleAction Dim myCondition As Outlook.RuleCondition Dim sRule As String Dim myVar As Variant Set colRules = Application.Session.DefaultStore.GetRules() For Each myRule In colRules sRule = myRule.Name & ": " & vbCrLf & "Conditions: " & vbCrLf For Each myCondition In myRule.Conditions If myCondition.Enabled Then sRule = sRule & vbTab & "Type: " & EnumName(myCondition.ConditionType, False) & " – " Select Case myCondition.Class Case olFromRuleCondition 'olConditionFrom ' For Each myVar In myCondition.Recipients sRule = sRule & myVar.Address & ", " Next Case olTextRuleCondition 'olConditionSubject ' For Each myVar In myCondition.Text sRule = sRule & myVar & ", " Next Case olAddressRuleCondition For Each myVar In myCondition.Address sRule = sRule & myVar & ", " Next Case olAccountRuleCondition sRule = sRule & myCondition.Account.DisplayName & ", " End Select sRule = sRule & vbCrLf End If Next sRule = sRule & vbCrLf & "Actions: " & vbCrLf For Each myAction In myRule.Actions If myAction.Enabled Then sRule = sRule & vbTab & "Type: " & EnumName(myAction.ActionType, True) & " – " Select Case myAction.Class Case olMoveOrCopyRuleAction sRule = sRule & myAction.Folder.FolderPath & " " Case olAssignToCategoryRuleAction For Each myVar In myAction.Categories sRule = sRule & myVar & ", " Next End Select sRule = sRule & vbCrLf End If Next ' If its a rule we want to run Debug.Print sRule Next End Sub Function EnumName(varType As Variant, blnActionType As Boolean) As String Dim strType As String If blnActionType Then Select Case varType Case 0 strType = "Action Unknown" Case 1 strType = "Move To Folder" Case 2 strType = "Assign To Category" Case 3 strType = "Delete Message" Case 4 strType = "Delete Permanently" Case 5 strType = "Copy To Folder" Case 6 strType = "Forward" Case 7 strType = "Forward As Attachment" Case 8 strType = "Redirect" Case 9 strType = "ServerReply" Case 10 strType = "Template" Case 11 strType = "Flag For Action In Days" Case 12 strType = "Flag Color" Case 13 strType = "Flag Clear" Case 14 strType = "Importance" Case 15 strType = "Sensitivity" Case 16 strType = "Print Message" Case 17 strType = "Play Sound" Case 18 strType = "Start Application" Case 19 strType = "Mark as Read" Case 20 strType = "Run Script" Case 21 strType = "Stop Processing " Case 22 strType = "Custom Action" Case 23 strType = "Display New Item Alert" Case 24 strType = "Display Desktop Alert" Case 25 strType = "Notify when Read" Case 26 strType = "Notify on Delivery" Case 27 strType = "Cc Message" Case 28 strType = "Defer delivery" Case 30 strType = "Clear Categories" Case 41 strType = "Mark As Task" Case Else strType = "Unknown" End Select Else Select Case varType Case 0 strType = "Unknown" Case 1 strType = "From" Case 2 strType = "Subject" Case 3 strType = "Account" Case 4 strType = "Sent Only To Me" Case 5 strType = "To" Case 6 strType = "Importance" Case 7 strType = "Sensitivity" Case 8 strType = "Flagged For Action" Case 9 strType = "Cc" Case 10 strType = "ToOrCc" Case 11 strType = "NotTo" Case 12 strType = "SentTo" Case 13 strType = "Body" Case 14 strType = "Body Or Subject" Case 15 strType = "Message Header contains" Case 16 strType = "Recipient Address" Case 17 strType = "Sender Address" Case 18 strType = "Category" Case 19 strType = "OOF" Case 20 strType = "Has Attachment" Case 21 strType = "In Size Range" Case 22 strType = "Date Range" Case 23 strType = "Uses Form Name" Case 24 strType = "Property" Case 25 strType = "Sender In Address Book" Case 26 strType = "Meeting Invite Or Update" Case 27 strType = "Local Machine Only" Case 28 strType = "Other Machine" Case 29 strType = "Any Category" Case 30 strType = "From Rss Feed" Case 31 strType = "From Any Rss Feed" Case Else strType = "Unknown" End Select End If EnumName = strType End Function