Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerfunc As Long) As Long Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long Public TimerID As Long 'Need a timer ID to eventually turn off the timer. If the timer ID <> 0 then the timer is running Sub RunRules() Dim olRules As Outlook.Rules Dim myRule As Outlook.Rule Dim olRuleNames() As Variant Dim name As Variant ' Enter the names of the rules you want to run olRuleNames = Array("Missed Calls", "Forward v") Set olRules = Application.Session.DefaultStore.GetRules() For Each name In olRuleNames() For Each myRule In olRules ' Rules we want to run If myRule.name = name Then myRule.Execute ShowProgress:=False End If Next Next End Sub Private Sub Application_Quit() If TimerID <> 0 Then Call DeactivateTimer 'Turn off timer upon quitting **VERY IMPORTANT** End Sub Private Sub Application_Startup() MsgBox "Activating the Timer." Call ActivateTimer(1) 'Set timer to go off every 1 minute End Sub Public Sub ActivateTimer(ByVal nMinutes As Long) nMinutes = nMinutes * 1000 * 60 'The SetTimer call accepts milliseconds, so convert to minutes If TimerID <> 0 Then Call DeactivateTimer 'Check to see if timer is running before call to SetTimer TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer) If TimerID = 0 Then MsgBox "The timer failed to activate." End If End Sub Public Sub DeactivateTimer() Dim lSuccess As Long lSuccess = KillTimer(0, TimerID) If lSuccess = 0 Then MsgBox "The timer failed to deactivate." Else TimerID = 0 End If End Sub Public Sub TriggerTimer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long) 'keeps calling every X Minutes unless deactivated If idevent = TimerID Then RunRules End If End Sub