outlook 2013 inbox rules to run hours

Hi I just want to be able to run outlook inbox rules every hour or couple of hours so that I can redirect some emails to a different folder if i dont catch them in time.
LVL 5
ncomperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

you could use the timer in

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24451158.html
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 lngTimerID As Long
 
Public Sub ActivateTimer(ByVal lngMinutes As Long)
    'The SetTimer call accepts milliseconds, so convert to minutes'
    lngMinutes = lngMinutes * 1000 * 60
    'Check to see if timer is running before call to SetTimer
    If lngTimerID <> 0 Then Call DeactivateTimer
    lngTimerID = SetTimer(0, 0, lngMinutes, AddressOf TriggerTimer)
    If lngTimerID = 0 Then
        MsgBox "The timer failed to activate."
    End If
End Sub
 
Public Sub DeactivateTimer()
    Dim lSuccess As Long
    lSuccess = KillTimer(0, lngTimerID)
    If lSuccess = 0 Then
        MsgBox "The timer failed to deactivate."
    Else
        lngTimerID = 0
    End If
End Sub
 
Private Sub TriggerTimer(ByVal hWnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long)
    'Change the name of the macro to run on the next line'
    Macro1
End Sub

Sub InitTimer()
     ActivateTimer 10
End Sub

Open in new window

and instead of Macro1 RunRule=>
Sub RunRule()
 
Dim olRules As Outlook.Rules
Dim myRule As Outlook.Rule
Dim olRuleName As String

         
olRuleName = "MyRule"
 
Set olRules = Application.Session.DefaultStore.GetRules()
 
For Each myRule In olRules
    If myRule.name = name Then
        myRule.Execute ShowProgress:=True
    End If
Next
End Sub

Open in new window

Regards

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.