How to email yourself a task via Outlook

41 views
Skip to first unread message

Lisa Stroyan

unread,
Nov 5, 2009, 9:18:15 PM11/5/09
to mylifeo...@googlegroups.com
Thanks *very much* to the person that emailed me offlist and suggested I set up a rule in Outlook to transfer certain emails to tasks, which then will sync with MLO.  I thought you all might to know how I did it.  I found this post and followed it:  http://www.paraesthesia.com/archive/2007/07/10/convert-an-outlook-message-into-a-task.aspx    Below is my modified subroutine that also adds the sender and the sender's address, and the date, to the body of the note.

Instead of taking things that have "TASK"" in the name, I set up my rule so that for one of my gmail addresses (which can have +string added to the name and it still goes to the address without the +string), mynam...@gmail.com .  That way I can give my husband and colleague that email address and they can email tasks to me also without having to type "TASK:"  I left the code in anyway, just in case.

I'm so psyched that I can mail myself tasks now.    All I have to do is get rid of the pesky warnings that some program is trying to access my email addresses....but I've wasted enough time on this already so I'll just live with them I guess.


Sub ProcessMailItemIntoTask(Item As Outlook.MailItem)
    Dim strTaskName As String
    strTaskName = Trim(Item.Subject)
   
    If Len(strTaskName) < 1 Then
        ' No subject - use the first line of the body
        strTaskName = Trim(Item.Body)
        Dim intCrLfPos As Integer
        intCrLfPos = InStr(1, strTaskName, Constants.vbCrLf, vbTextCompare)
        If intCrLfPos > 0 Then
            strTaskName = Trim(Left(strTaskName, intCrLfPos - 1))
        End If
    End If
   
    ' Trim TASK: off the line
    Dim intKeyWordPos As Integer
    intKeyWordPos = InStr(1, strTaskName, "TASK:", vbTextCompare)
    If intKeyWordPos = 1 Then
        strTaskName = Trim(Right(strTaskName, Len(strTaskName) - 5))
    End If
   
     ' Create the task
    Dim objTask As Outlook.TaskItem
    Set objTask = Application.CreateItem(olTaskItem)
    objTask.Subject = strTaskName
    ' My tasks usually don't have start dates
    ' objTask.StartDate = Item.ReceivedTime
    '
    ' objTask.UnRead = True
   
    objTask.Body = "From: " & Item.SenderName & " <" & Item.SenderEmailAddress & ">" & vbCrLf & "Date: " & Item.ReceivedTime & vbCrLf & Item.Body

    objTask.Save
    Set objTask = Nothing
End Sub

Lisa


Lisa Stroyan, mailto:lstr...@gmail.com
www.empathic-parenting.com

Eberhard

unread,
Nov 12, 2009, 3:30:47 AM11/12/09
to MyLifeOrganized
Hi Lisa,

very helpful information. "Implemented" it already into my system.

Just one question (in case you'd be able to answer)

Would there be any way to keep attachments when transforming an email
into a task?

Means: When having an email with attachments, and emailing them to
yourself... would there be any way, that the original attachments also
get embedded into the newly generated task?

I googled already, but to be honest I'm a totely newbie in regard to
Microsoft VB.

Thanks, Eberhard

On 6 Nov., 03:18, Lisa Stroyan <l...@stroyan.net> wrote:
> Thanks *very much* to the person that emailed me offlist and
> suggested I set up a rule in Outlook to transfer certain emails to
> tasks, which then will sync with MLO.  I thought you all might to
> know how I did it.  I found this post and followed
> it:
> <http://www.paraesthesia.com/archive/2007/07/10/convert-an-outlook-mes...>http://www.paraesthesia.com/archive/2007/07/10/convert-an-outlook-mes...
> Below is my modified subroutine that also adds the sender and the
> sender's address, and the date, to the body of the note.
>
> Instead of taking things that have "TASK"" in the name, I set up my
> rule so that for one of my gmail addresses (which can have +string
> added to the name and it still goes to the address without the
> +string), myname+t...@gmail.com .  That way I can give my husband and
> ----------
> Lisa Stroyan, mailto:lstro...@gmail.comwww.empathic-parenting.com 

Lisa Stroyan

unread,
Nov 12, 2009, 9:04:44 AM11/12/09
to mylifeo...@googlegroups.com
At 01:30 AM 11/12/2009, you wrote:
Would there be any way to keep attachments when transforming an email
into a task?

I was hoping to figure that out too, but I never got it working and I realized since it wouldn't be transferred to MLO anyway (I don't think?) I didn't need it enough to debug what I found.

This was my first experience with VB also (and those stupid Outlook security warnings).  I'm using Outlook 2003, so if you are using 2007 maybe the code I found would work for you:

http://www.outlookcode.com/d/code/copyatts.htm

Let me know if you get it working!

Eberhard

unread,
Nov 12, 2009, 12:39:56 PM11/12/09
to MyLifeOrganized
Thanks Lisa, will check out tomorrow (at work).

Here I'm also on Office 2003.

Thanks, Eberhard

On 12 Nov., 15:04, Lisa Stroyan <lstro...@gmail.com> wrote:
> At 01:30 AM 11/12/2009, you wrote:
>
> >Would there be any way to keep attachments when transforming an email
> >into a task?
>
> I was hoping to figure that out too, but I never got it working and I
> realized since it wouldn't be transferred to MLO anyway (I don't
> think?) I didn't need it enough to debug what I found.
>
> This was my first experience with VB also (and those stupid Outlook
> security warnings).  I'm using Outlook 2003, so if you are using 2007
> maybe the code I found would work for you:
>
> <http://www.outlookcode.com/d/code/copyatts.htm>http://www.outlookcode.com/d/code/copyatts.htm
>
> Let me know if you get it working!
>
> Lisa
>
Reply all
Reply to author
Forward
0 new messages