I've been working with outlook's tasks for a while and found that I really hated their implementation of recurring tasks as they kept showing back up in my view of things. So, I wrote a script that allowed me to mark these as done, but have them return at the right time. This is mostly for tasks that need to be done more or less on a given day or every 3 days. Things like weekly status reports or watering my plants at home (every other day).

So, here's the first draft of the script. There's some ultra-limited documentation in the comments at the top:

Code:

Sub Relist_Done&#40;&#41;
' Mike Miller - mikem@computer.org
' Copyright Mike Miller 2005
' http&#58;//3cats.us/
'
' This is a macro for Microsoft Outlook 2003 that performs 2 basic functions
' on tasks that have some extra text at the *end* of the subject line of the
' form "&#91;rate category1 category2&#93;" &#40;the two category values are optional,
' but I think they provide a lot of functionality&#41; and it performs the
' following actions on these tasks&#58;
'
' 1. If the task is complete, then move the task to the category1 category and
' set the due date to be the date marked complete + rate days and mark the
' task as not started
' 2. If the task is not complete, the due date is >= today, then move the
' task to the category2 category to draw attention to it.
'
' The usage model is that I had some small tasks that I needed to do on a
' highly regular basis, and basically wanted them to "recur" but outlook's
' recur mechanism leaves the item visible at all times, which is bad. For
' example, I want to water my plants every other day, so I have&#58;
' Water plants &#91;2 Tickler, Home&#93;
' So that when mark it done, it drops off the list, and goes into the tickler
' category until 2 days elapse and then it pops up in the home category
' again to remind me to water my plants.
'
' Eventually, I'd like to have more complicated expressions for "rate" like
' "MWF" or "2Sun" to get the recurrence to happen on particular days or the
' 2nd Sunday from now. Unfortunately, without regular expression support in
' VBA, parsing such items will be tricky, and for the first pass, I can live
' with just having #of days.
'
Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFolderTasks As Outlook.MAPIFolder
Dim myItems As Outlook.Items
Dim myItem As TaskItem
Dim myString As String
Dim myStringArray&#40;&#41; As String
Dim myRecur As String
Dim myHiddenCategory As String
Dim myActiveCategory As String
Set myolApp = CreateObject&#40;"Outlook.Application"&#41;
Set myNamespace = myolApp.GetNamespace&#40;"MAPI"&#41;
Set myolApp.ActiveExplorer.CurrentFolder = myNamespace.GetDefaultFolder&#40;olFolderTasks&#41;
Set myFolderTasks = myolApp.ActiveExplorer.CurrentFolder
For Each myItem In myFolderTasks.Items
' We check for subject = "" as protection against mid&#40;&#41; on zero-length strings
If &#40;myItem.Subject = ""&#41; Then
GoTo Relist_Skip_Item
End If
'See if this task has &#91;&#93; in it
myString = Mid&#40;myItem.Subject, Len&#40;myItem.Subject&#41;, 1&#41;
myStringArray = Split&#40;myItem.Subject, "&#91;"&#41;
If &#40;&#40;myString &lt;> "&#93;"&#41; Or &#40;UBound&#40;myStringArray&#41; &lt;> 1&#41;&#41; Then
GoTo Relist_Skip_Item
End If
' OK, this task appears to have stuff we are interested in, process
' what is between the &#91;&#93; and assign internal variables to the values
' for readability. Note that the 2 category options are optional.
myStringArray = Split&#40;myStringArray&#40;1&#41;, " "&#41;
myRecur = myStringArray&#40;0&#41;
If &#40;UBound&#40;myStringArray&#41; > 0&#41; Then
myHiddenCategory = myStringArray&#40;1&#41;
Else
myHiddenCategory = ""
End If
If &#40;UBound&#40;myStringArray&#41; > 1&#41; Then
myActiveCategory = Mid&#40;myStringArray&#40;2&#41;, 1, &#40;Len&#40;myStringArray&#40;2&#41;&#41; - 1&#41;&#41;
Else
myActiveCategory = ""
End If
If &#40;myItem.Status = olTaskComplete&#41; Then
' Here is were we reclaim a completed task and stash it off in the hidden
' tickler or waiting category so we don't have to look at it.
myItem.DueDate = myItem.DateCompleted + Int&#40;myRecur&#41;
myItem.Status = olTaskNotStarted
If &#40;myHiddenCategory &lt;> ""&#41; Then
myItem.Categories = myHiddenCategory
End If
myItem.Save
Else
' If the user provided us with an active category and the due date is
' today, then "promote" the task to the active category so it gets the
' right visiblity
If &#40;myActiveCategory &lt;> ""&#41; Then
MsgBox "comparing " &amp; myItem.DueDate &amp; " with " &amp; Date
If &#40;myItem.DueDate &lt;= Date&#41; Then
myItem.Categories = myActiveCategory
myItem.Save
End If
End If
End If
' yes, I know gotos are evil, but I don't know of the break functionality
' so I'm not nested so deep I can't make heads or tails of where I am...
Relist_Skip_Item&#58;
Next
End Sub

I'd be interested in feedback on my script or suggestions on how to make it better.

Comment

I'm so tired of seeing "Time sheets" on my daily task list! Tried to work on a filter to hide them, but couldn't quite figure it out. The hiding worked, but couldn't get them to display on the date due. This sounds like just the ticket!

I do need them on the 15th &amp; 30/31st, so I'll see if I can play around with that bit.

Comment

To add a macro to Outlook, go to Tools -> Macro -> Macros which brings up a little dialogue box. Type macroname in the "Macro Name" field and then click on the "Create" button. This should bring up the Visual Basic Editor with

Comment

I've added some more comments and also made it pop up a message box showing which tasks it has changed. I found this to be particularly useful for "Promoted" items so that they get called to my attention.