Aqui está. Observe que isso é específico da pasta Junk (olFolderJunk é uma constante do Outlook) e executará qualquer filtro que eu criar prefixado com "JUNK_FILTER _".
É otimista e praticamente não tem verificação de erros, portanto, use-o a seu próprio risco. Não use se você não entender:)
Sub runRulesOnJunkFolder()
Dim st As Outlook.Store
Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim count As Integer
Dim ruleList As String
Dim rulePrefix As String
Dim ruleFolder As Long
'
Dim outlookApp As Outlook.Application
Dim objNS As NameSpace
ruleFolder = olFolderJunk
rulePrefix = "JUNK_FILTER_"
Set objNS = Application.GetNamespace("MAPI")
Set objJunkfolder = objNS.GetDefaultFolder(ruleFolder)
' get default store (where rules live)
Set st = Application.Session.DefaultStore
' get rules
Set myRules = st.GetRules
' iterate all the rules
For Each rl In myRules
' determine if it's an Inbox rule and rule name prefix matches
If rl.RuleType = olRuleReceive And Left(rl.Name, Len(rulePrefix)) = rulePrefix Then
' if so, run it
rl.Execute ShowProgress:=True, Folder:=objJunkfolder
count = count + 1
ruleList = ruleList & vbCrLf & rl.Name
End If
Next
' tell the user what you did
ruleList = "These rules were executed against the folder: " & objJunkfolder.Name & vbCrLf & ruleList
MsgBox ruleList, vbInformation, "Macro: runRulesOnJunkFolder"
Set rl = Nothing
Set st = Nothing
Set myRules = Nothing
Set objJunkfolder = Nothing
Set objNS = Nothing
End Sub