tobey1
asked on
Clearing Completed Tasks via a script
I like to use Outlook Today and Tasks, but once a task is completed, I don't want it to show in Outlook Today. I would like to craft a script to move completed tasks from the Task folder to a folder called "Task-Completed". Can someone help me get started with this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I tried the above, and it keeps resolving the destination folder to nothing.
Set olkTaskArchive = OpenOutlookFolder("\\Mailb ox - Last, First\Tasks\Tasks-Complete d")
Am I missing something?
Set olkTaskArchive = OpenOutlookFolder("\\Mailb
Am I missing something?
ASKER
Thanks...that worked when I got rid of the \\ before Mailbox.
Any way to get this to run automatically?
Any way to get this to run automatically?
When you say "automatically" what do you have in mind? When Outlook opens or closes, timed, or something else?
ASKER
either on Open/Close or when the Task is marked closed.
It's easy to do it when opening/closing Outlook. Add the code below to the ThisOutlookSession module. It'll run the first macro each time Outlook starts.
Sub Application_Startup()
MoveCompletedTasks
End Sub
ASKER
Thanks again for your help!
You're welcome!
http://www.outlookcode.com
http://www.slovaktech.com/code_samples.htm