Avatar of tobey1
tobey1Flag for United States of America 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?

Avatar of undefined
Last Comment
David Lee

8/22/2022 - Mon

David Lee

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I tried the above, and it keeps resolving the destination folder to nothing.

Set olkTaskArchive = OpenOutlookFolder("\\Mailbox - Last, First\Tasks\Tasks-Completed")

Am I missing something?

Thanks...that worked when I got rid of the \\ before Mailbox.

Any way to get this to run automatically?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
David Lee

When you say "automatically" what do you have in mind?  When Outlook opens or closes, timed, or something else?

either on Open/Close or when the Task is marked closed.
David Lee

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()
End Sub

Open in new window

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Thanks again for your help!
David Lee

You're welcome!