1. Open Notepad.
2. Copy the code in the snippet and paste it into Notepad. Edit the code as needed. We placed comments where things can/need to change.
'Change the following three constants as desired
Const SHOW_PROGRESS = True
Const INCLUDE_SUBFOLDERS = False
Const UNREAD_MSGS_ONLY = 2
Dim olkApp, olkSes, olkFolder, olkRule
Set olkApp = CreateObject("Outlook.Application")
Set olkSes = olkApp.GetNameSpace("MAPI")
'Change Outlook on hte next line to the name of your mail profile'
olkSes.Logon "Outlook"
Set olkFolder = olkSes.GetDefaultFolder(6)
For Each olkRule In olkSes.DefaultStore.GetRules
olkRule.Execute SHOW_PROGRESS, olkFolder, INCLUDE_SUBFOLDERS, UNREAD_MSGS_ONLY
Next
Set olkRule = Nothing
Set olkFolder = Nothing
olkSes.Logoff
Set olkSes = Nothing
Set olkApp = Nothing
4. Save the file with a .vbs extension.
5. Test the script by double-clicking it. All of your rules should execute.
6. Create a scheduled task using Windows Task Scheduler.
7. Set the task to run this script.
You still need the original code to turn rules off when you leave and turn them back on when you return to the office. If the rules are not turned off, then they will continue executing when you don’t wnat them to.
Incoming search terms:
- run outlook rules on a schedule (58)
- schedule outlook rules (27)
- outlook rules schedule (19)
- schedule outlook rules to run (17)
- outlook 2010 schedule rules (16)
- outlook schedule rules (16)
- run outlook rule scheduled time (15)
- run outlook rules on schedule (15)
- run outlook rules at specific time (10)
- run outlook 2010 rules schedule (8)
is there anyway to use this code with outlook 2003?
Hi
Good post, but I am still wonder how to establish rule fore folder random than default inbox
for example I have second mailbox:
\\My2mail\directory1
Have you any ideas?
best regards
Realy this is help full.
Do you have this code office 2010 version?
Thanks.
I was able to use this on office 2010 and it worked great.
thanks
Thanks this worked great. One question… Is it possible to set a parameter so I can execute a specific rule as opposed to all of my rule?