Thursday 7 January 2010

Applying GTD principles to Outlook 2007

I have now read a large chunk of David Allen's "Getting Things Done" book and have started to apply some (not all!) of the principles to my home and work processes. This started with me tidying my desk before Christmas leave, and filing away reference documents in folders. It's amazing how positive a tidy desk can make you feel.

I also attacked the 13000+ items in my inbox and split them into Archive sub-folders, one for each year (Archive - 2009, Archive - 2008 etc.). This meant that when I started back in January, my inbox had zero items in it!

The heavy snow has resulted in me working from home this week and the productivity benefit has been huge! I have successfully completed almost all of the 69 items I have marked in Outlook "For Follow Up". This had become a catch-all view of emails I wanted to review, or that required action. While it was better than marking the email unread (which some of my colleagues do), it wasn't ideal and could quickly become unwieldy.

So my new plan is to attempt an "Inbox Zero" approach to email. If an email requires an action that takes less than five minutes, I'll do it immediately, otherwise I'll assign it to a category and archive it.

I've also created some additional categories, @Deferred, @Someday/Maybe and @Waiting. GTD followers will recognise these. I've also created a new "Archive - 2010" folder to put emails that are dealt with but I need to keep. All read and actioned emails go here.

Manually setting these categories and dragging completed emails to the archive folder works, but I wanted to have toolbar buttons. Unfortunately my VBA skills are non-existent, but a quick Google found these two sites:

The former site provides a macro for assigning categories to selected items, and the latter provides a macro for moving selected messages to a designated folder. The first of those two links also provides details on creating a self-signed cert to enable macros in Outlook. Full credit for this code goes to the above sites.

Once I'd modified the macros for my own needs, I created a new toolbar which gives me one click actions to the categories and email archiving:

The source code to the macros is very simple:

Sub Waiting()
Call updateCategoryMain("@Waiting")
End Sub

Sub Someday()
Call updateCategoryMain("@Someday/Maybe")
End Sub

Sub Deferred()
Call updateCategoryMain("@Deferred")
End Sub

Function updateCategoryMain(cat As String)
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
Set myOlExp = Application.ActiveExplorer
Set myOlSel = myOlExp.Selection
Dim i As Integer
For i = 1 To myOlSel.Count
Call updateCategory(myOlSel(i), cat)
Next i
End Function

Function updateCategory(mi As Object, cat As String)
Dim pos As Integer
pos = InStr(1, mi.categories, cat, vbTextCompare)
If pos > 0 Then
a = Left(mi.categories, pos - 1)
b = Right(mi.categories, Len(mi.categories) - pos - Len(cat) + 1)
res = a & b
mi.categories = res
mi.categories = mi.categories + "," + cat
End If
End Function

Sub Archive()
On Error Resume Next
Dim objFolder As Outlook.MAPIFolder
Dim objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace
Dim objItem As Outlook.MailItem
Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objFolder = objNS.Folders.Item("Mailbox - R, J (XXX)").Folders.Item("Archive - 2010")

'Assume this is a mail folder
If objFolder Is Nothing Then
MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
End If

If Application.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Sub
End If

For Each objItem In Application.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
If objItem.Class = olMail Then
objItem.Move objFolder
End If
End If

Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub

Okay, so there's a fair amount of hard coding, but I didn't want to spend more time than absolutely necessary to get this working!

The final improvement I've done is to assign colours to my incoming emails. By selecting Tools, Organize and then selecting "Using Colors", it's possible to configure Outlook so that mails that are only to me are in blue, mails from my line manager(s) are in red and mails from T are in green. Everything else is in black, but it provides a nice visual clue.

No promises that Inbox Zero and the GTD approach will work for me, but so far I've managed to stay on top of incoming requests and finding things in my mailbox is refreshingly speedy.

1 comment:

Alex said...
This comment has been removed by a blog administrator.