Creating GTD Tasks Automatically from Email sent to yourself
xoff;40670 said:
I bought Next Action! and was disapointed in the lack of integration to my outlook GTD add-in setup.
[...]
The problem that I still have with NextAction and the BB app, is that I cannot assign a project when creating the task. So I find myself having to come back on my outlook to assign the project. So each task requires two steps in two different platforms (highly unproductive).
Maybe for all of us BB users with GTD Addin, the best solution in BB to create a task on the road that would in turn create as a task in outlook, would be to send ourselves an email from the BB with the tast content in a specific format, and then have a macro in OL that processes it and creates an outlook task with all the data. Not sure if anyone has tried this?
xoff
I havent used Next Action because of the drawbacks that you mention. Instead I've been using the GTD Outlook add-in on and wondering how to use my Blackberry in the most GTD-compatible and efficient way.
The idea of sending yourself an email and then letting Outlook process it on the desktop computer and create the relevant task is a simple one, although it does have the minor drawback of having to have the desktop computer and Outlook constantly running if you want your Tasks to be updated in real-time.
Anyway, I thought I would give it a try by using an Outlook rule to filter any emails that I send to myself with a specific in the subject line.
This rule invokes a VB Macro that I am pasting below... It basically creates a new Task everytime such an email arrives, and then DELETES THE EMAIL (remove the last line of code if you dont want to do this).
The code is also very klutzy... the macro will look for any strings in the email which match the hard-coded list of Actions and Projects in the code (search for **** to find this). It will then try to assign Categories, Actions and a Project to the Task that it creates.
HOWEVER, it doesnt really work, because I have not found out who to assign Actions and Projects to this task: if I try the obvious:
objTask.Action = ...
I get an error. I think the problem is that a regular Outlook Task doesnt have the Action property. So one has to create the same type of GTDTask that the GTD Outlook add-in uses.
Maybe someone with more programming skills knows how to do this?
Outlook VB Macro below
Option Explicit
Sub SetCategories(MyMail As MailItem)
' This creates a new Task every time it processes an email whose Subject line starts with the string "stask ".
' The Categories of the Task are set by searching for any strings such as @Calls in the body of the task
' The subject, body, etc of the task are just copied from the email
'
' Things to do:
' Set the .Action of the Task
' allow the creation of Calendar events as well as tasks...
Dim sAction, sProject, sCategories As String
Dim sActions, sProjects As Variant
Dim i As Integer
Dim sBody, sSubject As String
Dim strID As String
Dim objNS As Outlook.NameSpace
Dim objMail As Outlook.MailItem
Dim objTasks As Outlook.MAPIFolder
Dim objTask As Outlook.TaskItem
strID = MyMail.EntryID
Set objNS = Application.GetNamespace("MAPI")
Set objTasks = objNS.GetDefaultFolder(olFolderTasks)
Set objMail = objNS.GetItemFromID(strID)
sBody = LCase(objMail.body)
sSubject = objMail.Subject
If Left(LCase(sSubject), 6) = "stask " Then
Set objTask = CreateItem(olTaskItem)
' Include all your actions here ****
sActions = Array("@Agendas", "@Anywhere", "@Calls", "@Computer", _
"@Errands", "@Waiting For", "@Read", "@Internet", _
"@Home", _
"@Office", "@Deferred", "Projects", "Someday")
' Include all your Projects here
sProjects = Array("@GTD Setup", "@Boat", "@CompMaint")
i = 0
Do
If sActions(i) "" Then If InStr(sBody, LCase(sActions(i))) > 0 Then sAction = sActions(i)
If sProjects(i) "" Then If InStr(sBody, LCase(sProjects(i))) > 0 Then sProject = Right(sProjects(i), Len(sProjects(i)) - 1)
i = i + 1
Loop Until i > UBound(sActions) Or i > UBound(sProjects)
If sProject "" Then
sCategories = sAction & ", " & sProject
Else
sCategories = sAction
End If
'objMail.categories = sCategories
With objTask
' the below line doenst work for some reason...
'.Actions = sAction
.categories = sCategories
.Subject = Right(sSubject, Len(sSubject) - 6)
.StartDate = Now
.Status = olTaskInProgress
.Importance = objMail.Importance
.body = objMail.body
.Save
End With
objMail.Delete
End If
End Sub