ForumsTips & TricksOne-Click Toodledo Outlook Button (code included)


One-Click Toodledo Outlook Button (code included)
Author Message
raindog308

Posted: Jul 09, 2010
Score: 2 Reference
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.

Sub ForwardToEvernote()
Dim objMail As Outlook.MailItem
Set objItem = GetCurrentItem()
Set objMail = objItem.Forward
objMail.DeleteAfterSubmit = True
objMail.To = "[email protected]"
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 = "[email protected]"
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.

That's so cool, they should send you a free purple Toodledo polo shirt so you can wear it to work and continue your Toodledo evangelization, you wonderful pro plus subscriber, you!

Aw, you make me blush.
johnwin

Posted: Jul 11, 2010
Score: 0 Reference
Superb - I'll be setting this up at work in the morning

Thanks

Done - works great. Thank you andrew


This message was edited Jul 12, 2010.
mamouton

Posted: Jul 13, 2010
Score: 0 Reference
How do you find your toodledo email address

Mail.To = "[email protected]"


I tried my username but it has two @ signs [email protected]@toodledo.com

Any help please,
PeterW 

Posted: Jul 13, 2010
Score: 0 Reference
Your Toodledo email address can be found here:
http://www.toodledo.com/connect_email.php
glenwiedman

Posted: Jul 14, 2010
Score: 0 Reference
This is an excellent add on, if anyone knows how to add in tags, list and context it would make it even better. Anyone out there know how to do this?
Matt Brooks

Posted: Jul 15, 2010
Score: 0 Reference
Hi,
I have to agree its a wonderful addin can't believe how much I use it.

To get the code to include contexts replace this line

Replace(objMail.Subject, "FW:From Outlook ! ", "")

with this line

objMail.Subject = objMail.Subject & " ! #today >today *Outlook @at work "

Using these parameters within the " " of the above line

https://www.toodledo.com/info/help_email.php

On mine I have it setting the start date to today the due date for today the folder is called Outlook and the context is at work

Hope this helps.
Matt
Danielle

Posted: Aug 04, 2010
Score: 0 Reference
I set this macro up. It worked yesterday, but today it's not working. I'm perplexed. Help!

Thanks
Danielle
kimpanza

Posted: Aug 09, 2010
Score: 0 Reference
I also set this up and it was working on Friday, today it is not working. I am running Vista and Office 2007. The buttons still appear. I think it might have something to do with how 2007 save macros differently. Please help this is a great tool for me.

Thanks,
Kim
Matt Brooks

Posted: Aug 16, 2010
Score: 0 Reference
Hi,

To enable the macro you need to certify that it is secure to run

http://www.howto-outlook.com/howto/selfcert.htm

Regards
Matt
javierplumey

Posted: Aug 19, 2010
Score: 0 Reference
Note that you can also specify the notebook in which to import your note in Evernote by adding @ symbol:

objMail.Subject = objMail.Subject & " #sometag @somenotebook"
2kewlgypsy

Posted: Oct 19, 2010
Score: 0 Reference
Where do attachments go? I can't seem to get to them in Toodledo.
Web

Posted: Nov 11, 2010
Score: 0 Reference
Absolutely brilliant. I'm a horrific script writer, but I'm attempting to adapt this so that any email I bcc to myself will get forwarded to my @waiting folder with the subject line as the person i sent it to, the date and the original subject line.

Wish me luck!
Web

Posted: Nov 13, 2010
Score: 0 Reference
Okay, so it turns out that I don't speak Visual Basic (or any other scripting language, sadly). Might anybody have a suggestion for sending better @waiting items from Outlook? What I want should be pretty straightforward and derivative (in a good way).

Specifically, I'd like to:
1) send an email to someone and B'CC myself
2) then take that BCC email, add to the subject line who I sent it to and the date in parenthesis. It would look something like John Smith (1/1)-- Original Subject Line
3) send this modified email to Toodledo

Triggering a script with a rule and sending an email to Toodledo are easy. It's just the actual script that I can't do :-(

If anybody has the kind of chops to whip this script up or otherwise suggest a solution, I'd be grateful.

Yours truly,
Ari
greginfla_

Posted: Nov 29, 2010
Score: 0 Reference
can someone help with the due date for this script. I wanted to set the due date as X days later.

"•Due-Date - To set a due-date, use the # symbol and then type the due-date. For example: "#today" or "#Next thursday" or "#5/12/08"."

what I wanted to do was "#today+1"

when I run the script...the due day is enter as "yesterday"

so I tried "#today-1".... but the due date is still yesterday.


can I add to today?
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.