I wish it were that simple. This is in a law office environment, and this particular Outlook box has an addin that creates subfolders under the Inbox every time a specific type of email comes in. This could happen from 10 to 100 times a day. There is an option to "sort and trim" the inbox, but the option is broken. The addin itself is discontinued as well. So, the quick and dirty fix is to close outlook and reopen outlook, causing the program to do an automated sort and trim.
I figured it out, downloaded a utility from
here to kill the process, then made my batch file look like this:
@echo off
c:
process -k outlook.exe
ping 1.1.1.1 -n 1 -w 30000 >NUL
"C:\Program Files\Microsoft Office\OFFICE11\outlook.exe"
I have it set to run every day at noon, which should be enough. Scheduled Tasks doesn't allow hourly or every x hour runs.