Forum

  • If you are new to these Forums, please take a moment to register using the fields above.

Announcement

Announcement Module
Collapse
No announcement yet.

Howto: Set up buttons in Outlook to send mail to Evernote, Toodledo, RTM, etc.

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Howto: Set up buttons in Outlook to send mail to Evernote, Toodledo, RTM, etc.

    If you use Outlook, you might enjoy using the macro I wrote that lets you create a one-click button to send an item to Evernote, Toodledo, Remember the Milk, or any other email service. I love it because it lets me efficiently process my inbox GTD-style, sending all my reference material off to Evernote for archiving and anything actionable directly into my todo system.

    Evernote has an Outlook clipper but it has several flaws in my experience:
    • You can't specify a tag or folder.
    • It does not include attachments.
    • It's actually two clicks (one to clip and send, another to delete).
    Toodledo has a third party "sync tasks with Outlook" plugin, but not a "generate todo from Outlook while reading mail" plug-in, other than manually forwarding. I think the same is true for Remember The Milk.

    So I decided to create a simple "click and forget" button for both EN and TD. I should warn you that I am not a VBA programmer by trade, so most of the code is a combination of googled cut-paste and looking up a few VBA calls. Fortunately, the code is really simple.

    What does it do?

    When I click the "Archive to Evernote" button, the macro:
    • Forwards the message to Evernote. It removes the annoying FW: prefix and adds the # tag I want. I only add one tag but you could change the code to add as many tags as you want.
    • Deletes the original email in Outlook. Of course, it's still in the Deleted Items.
    When I click the "Create Todo" button, the macro:
    • Creates an forward email and displays it for me. Usually I want to edit the Subject, since that's what Toodledo uses as the todo title. You could customize the code to pre-fill tags, folders, priorities, etc. in the Subject line if you wanted but I don't.
    • Deletes the email in Outlook

    Sweet! How do I set it up?
    You don't need to know VBA to use this. Here's the step by step:

    Copy/Paste the Macro Code

    (1) Fire up Outlook. Open Tools->Macros->Visual Basic Editor

    (2) In the upper left window, right-click on Project1 and create a new module by selecting Insert New Module.

    (3) Paste the following code into the code window. Note that you need to customize your Evernote/Toodledo email address and the #tag you want.

    Code:
    Sub ForwardToEvernote()
    Dim objMail As Outlook.MailItem
    Set objItem = GetCurrentItem()
    Set objMail = objItem.Forward
    objMail.DeleteAfterSubmit = True
    objMail.To = "your_address@m.evernote.com"
    objMail.Subject = Replace(objMail.Subject, "FW: ", "")
    objMail.Subject = objMail.Subject & " #some_tag_of_yours"
    objMail.Send
    objItem.Delete
    Set objItem = Nothing
    Set objMail = Nothing
    End Sub
    
    Sub ForwardToToodledo()
    Dim objMail As Outlook.MailItem
    Set objItem = GetCurrentItem()
    Set objMail = objItem.Forward
    objMail.DeleteAfterSubmit = True
    objMail.To = "your_address@toodledo.com"
    objMail.Subject = Replace(objMail.Subject, "FW: ", "")
    objMail.Display
    objItem.Delete
    Set objItem = Nothing
    Set objMail = Nothing
    End Sub
    
    Function GetCurrentItem() As Object
    Dim objApp As Outlook.Application
    Set objApp = Application
    On Error Resume Next
    Select Case TypeName(objApp.ActiveWindow)
    Case "Explorer"
    Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
    Case "Inspector"
    Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
    Case Else
    End Select
    End Function
    4. Select File->Close And Return to Outlook. The macro is now created. The rest of this is creating an easy-to-use button.

    Create the Main Mail Window Button

    5. I'm going to setup two buttons for the Evernote macro - one in the main Outlook mail window (where you see your list of messages), and one in the message window (when you double click a message and open it up).

    6. In your main Outlook window, right-click on the toolbar (to the right of the Help menu item) and select Customize.

    7. In the popup window, select Toolbars and click New. Name your new toolbar "MyEvernote" or whatever. Click OK

    8. You'll now have a little blue toolbar window floating without any commands in it. In the "Customize" popup, switch to Commands. Under Categories select Macros. Under Commands, drag Project1.ForwardToEvernote over to the MyEvernote toolbar. Now close the Customize window.

    9. In the floating toolbar you created, right-click on the button. Change the Name to something nicer like "Archive to Evernote".

    10. You can either Change Button Image and pick one, or select Edit Button Image. Personally I did Edit Button Image, cleared it, and set the entire square to dark green. This makes it consistent with step 16 below. There is doubtless some way to create a custom icon and pick it here, but I'm not a Windows guy

    11. When you're done editing, drag your floating toolbar up and dock it in the main Outlook toolbars. Go ahead and give it a try! Whatever message you have selected will be sent to Evernote and then deleted. Note that it is now at the Evernote server, so it won't show up locally until your next sync.

    Create the Email Window Button

    12. Now let's add one that same button to the message window so you can use it when you open an email message. Open any email message by double-clicking on it. At the very top, you see the save, undo, redo, and next/previous arrows. Just to the right of that is a little pulldown arrow. Click on it and pull down the menu.

    13. Select More Commands...

    14. In the Customize the Quick Access Toolbar, change "Choose commands from" to Macros.

    15. Select your macro and click Add.

    16. Once it's in the Quick Access Toolbar, click Modify. In the popup you can change the name (e.g., "Archive to Evernote"). You can also pick an icon...I don't know how you would custom-edit one. I picked the all-dark-green color, so the button looks the same in either view.

    Now you can repeat steps 7-16 for Toodledo, which I made purple and called "Add Todo".

    Any Gotchas?
    • I've only tested this with Outlook 2007
    • The email sent (to Evernote, Toodledo, etc.) is not stored in your Sent Items (after all, the point is getting it out of Outlook If you want to keep those emails for some reason, you could remove the "objMail.DeleteAfterSubmit = True" lines. But this means you'd crate a Sent Items email for every message you forward to Evernote, Toodledo, etc.

  • #2
    That's so cool!

    I'm completely impressed by this concept! Thanks for sharing the details.

    Comment


    • #3
      Great Idea!

      I have been looking for something very similar to this, but I am stuck. I was able to get this working for 99% of what I am trying to do. What I would like is to be able to forward the "current item" as an attachment not just a simple forward.

      I think I am supposed to use something like: MailItem.Attachments.Add

      I just dont know where to put that in the code. Do you have any suggestions?

      Thanks

      Ryan

      Comment

      Working...
      X