Turning an Outlook Email into a ResultsManager Activity using ActiveWords and GyroActivator
I’ve been promising for a while to post the glue that ties together Outlook, ActiveWords, GyroActivator, GyroQ, ResultsManager, and MindManager. (Whew! That sounds like a lot of gadgets when they’re all written out in a list like that!) What follows is my attempt to deliver on that promise.
This is just one of the handful of tools/workflows that I use. I call it “tfe”, which stands for “Task From Email”. This was my original Holy Grail usage scenario, meaning, I figured that if I could use these tools to accomplish this, I figured it would dramatically enhance my productivity. Back when I used the Outlook GTD Add-in, I got really attached to working like this. When I’m in the mode of quickly process my inbox, item by item, two minutes or less per item, I want to be able to quickly make an email actionable in as a few steps as possible. The Add-in was very, very good at enabling such a workflow–turning each email into a task very easily.
My “tfe” mashup doesn’t make for quite as smooth an experience as the GTD Add-in in this particular use case, but it’s Good Enough.
Without further ado…
Overview
- My “tfe” ActiveWord triggers the Outlook Macro “MoveToSavedAndCopyLink”
- The Outlook Macro marks the mail item read, moves it into my saved mail folder and makes a copy of a link to the item. That link looks like “Outlook:139487987adsf987324″, or something like that. But if you were to copy that link into the Start Menu’s run box, it would pop up the actual mail item. I will later add this as a hyperlink to the ResultsManager activity in my map.
- After running the Outlook Macro, the ActiveWord then uses GyroActivator to process a script that will create the ResultsManager activity, which it places in the queue.
- Later on, I will manually use GyroQ’s “Send Queue” command from the menu on the GyroQ icon in the system tray. This will send all contents of the queue into my map.
Ok, now, step by step.
ActiveWords
Here’s the script I have defined for my ActiveWord “tfe”. (If you want to copy this, it may work better to work from this plain text file instead: TFE)
<only:Outlook>
<alt>e</alt>a
<pause>
<”<REGISTRY VALUE:HKEY_LOCAL_MACHINE±SOFTWARE\Gyronix\GyroActivator\±>”
“{run:’C:\Documents and Settings\mwilkerson\My Documents\GrooveShares\Wilkerson\GyroActivator\EnqueueTaskFromEmail.txt’}”>
Now, to unpack that a bit…
Outlook Macro
The ALT-e-a sequence selects a custom Outlook macro from the Edit menu that I’ve called “To Saved with Link Copy”. I put that there using Tools->Customize in Outlook and dragging the macro I’d created over to the Edit menu. I’ll leave those details out now, hoping that you know how to do that. But don’t be shy to ask for help with that if you need. Just post a comment below.
So, what’s inside that Macro? (This may not look pretty on the blog: click here for the plain text file: MoveToSavedAndCopyLink)
‘ This subroutine will move the select email object to a mail folder called “saved”
‘ which lives under the default Inbox folder and mark it Read.
‘ After moving it, it will copy a link to that email to the clipboard.
Sub MoveToSavedAndCopyLink()
‘ Must add a Reference to scrrun.dll and fm20.dll which should live in the windows\system32 directory
‘ Use Tools->References… in the Macro editor to add the reference.On Error Resume Next
Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace, objItem, objMovedItem As Outlook.MailItem
Set objNS = Application.GetNamespace(”MAPI”)
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)‘ I will be using a folder called “saved” which lives under the default Inbox folder
Set objFolder = objInbox.Folders(”saved”)‘Assume this is a mail folder
If objFolder Is Nothing Then
MsgBox “This folder doesn’t exist!”, vbOKOnly + vbExclamation, “INVALID FOLDER”
End IfIf Application.ActiveExplorer.Selection.Count <> 1 Then
‘Require that this procedure be called only when exactly one message is selected
Exit Sub
End If‘ Loop through each item in the Selection–this is probably unnecessary
‘ since we already know that there should only be one
For Each objItem In Application.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
‘ Make sure we’re dealing with a mail item here
If objItem.Class = olMail Then
‘ Mark it Read
objItem.UnRead = False
Dim txtMsg As String‘ Move the mail item to the saved folder
‘ objMovedItem will contain a reference to the new object that lives in “saved”
Set objMovedItem = objItem.Move(objFolder)‘ Now build a link to that item. The URI should start with “Outlook:”
‘ The body of the link is the EntryID for the item.
txtMsg = “Outlook:” + objMovedItem.EntryID‘ To get txtMsg onto the clipboard, we’ve got to stuff it into a DataObject
‘ and then copy the DataObject onto the system clipboard.
Dim objMsg As New DataObjectobjMsg.SetText txtMsg
objMsg.PutInClipboard‘ cleanup
Set objMsg = Nothing
End If
End If
Next‘ cleanup
Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub
GyroActivator Script
And finally, we have the GyroActivator script. This will take the the link that the Outlook macro copied to the clipboard, and make it a hyperlink on the activity that it enqueues. Again, the text file will be easier to work with if you want to use my script as a starting point for making your own. Here’s the text file: EnqueueTaskFromEmail
{queue;
map:’C:\Documents and Settings\mwilkerson\My Documents\My Maps\Sync\Bit Bucket.mmap’;
select:maintopic;select:bookmark:’intray’;
new:subtopic:’?Activity Title: ?’;
rm_owners:’_rm_me_’;
hyperlink:_clipboard_;notes:’_today_ mlw - See Attached Email’}
The queue command says “put this in the queue; don’t do it right now”. This saves time because MindManager is a big application, and if GyroActivator were to actually do this each and every time I ran tfe, it might not be a two minute action any longer!
The map command says that I always want to put these new activities in the same map. This is just the way I’ve chosen to use ResultsManager and In Trays. I have one main In Tray in a map called Bit Bucket.
The select command ultimately selects the topic that represents the In Tray. In my Bit Bucket map, I’ve used MindManager’s bookmark (aka label?) feature to add a bookmark on that topic. It’s called “intray”.
The new:subtopic command is using the GyroActivator user input feature–that’s what the question marks are for. This will actually pop up a dialog box prompting me for the title of this activity. I’ll enter something simple.
The rm_owners command uses a built-in keyword _rm_me_ to set the owner of this activity to me. GyroActivator will automatically substitute “Mike Wilkerson” here.
The hyperlink command is the magic that pastes our email link into the activity. Notice it is using the _clipboard_ keyword, which pulls from whatever content is is on the clipboard, which should be our hyperlink to the email since the Outlook macro should have been the last thing that ran and copied something to the clipboard.
Finally, the notes command just adds a date stamp, my initials, and some text to remind me that the attached email is my context for the task.
Other Glue
I also have similar bits and pieces for the following workflows, that I may post someday
- Send Email and Delegate: Copy a link to the last sent mail and enqueue a Waiting For activity that is linked to that email. Again, I got this idea from the GTD Outlook Add-in
- New Activity from Task (aka “nat”): This will let me select an Outlook task in Outlook, run the ActiveWord “nat”, which will enqueue a new activity using the original Outlook Task’s subject as the title for the ResultsManager activity, and copying the notes in the original task into the notes of the new activity.
November 28th, 2006 at 7:06 pm
Thanks for this Mike — This is a critical timesaver that could make all the difference in trying to leverage ResultsManager in an Outlook world.
During my ActiveWords trial I had independently tried something analogous to your the forward/copy/paste macro (described in an earlier post), but found it always made an alarming beep along the way (at least with my implementation) and didn’t seem totally reliable I’m looking forward to giving this a try.
You might want to check on the use of “queue;” vs. “queue:’_queuefile_’” as that post-beta switch in approach can cause some hiccups with other users. The other thing to watch out for is multi-user environment where the inaccessible outlook link can cause MindManager problems.
So when do we get your sometime/maybe vs. sometime/never trick? Did build this much suspense into your 9-part plan?
.
December 4th, 2006 at 4:10 am
Hi Mike,
Many thanks for this post. Line “Dim objMsg As New DataObject” gives an error ‘User defined type not defined’ when I try this macro
December 4th, 2006 at 9:15 am
Ah, that’s one thing I forgot to add to the code listing. You must add a reference to the Microsoft Forms 2.0 library, which should be located at c:\windows\system32\fm20.dll. I’ve updated the text of the blog and the text download file, adding a comment to that effect. Thanks for catching that for me!
February 20th, 2007 at 5:27 pm
[…] Mike W. has shared a method for turning a outlook email into a ResultsManager activity that provides a streamlined method for the outlook to ResultsManager trip […]
May 23rd, 2007 at 8:20 am
Hi
many thanks for posting this - I have managed to get all the way through to the link being inserted into a new topic in the intray - but - when I click the link I get a MindManager error message saying: “You do not have permission to access this file” followed by the hyperlink, which is:
Outlook:00000000D3FBD999B7C31F48AB9401CC2813FD6D44692700
Very grateful if you could point me in the right direction.
thanks in anticipation
best wishes
Paul
June 23rd, 2007 at 8:40 am
I desperately need to get this working in Vista / Office 07 and all the latest versions of activewords,activator,gyroq…..but the link that is created doesn’t work…creating a hyperlink from the resultant clipboard in any office app generates a message:
“The address of this site is not valid. Check the address and try again.”
Any ideas on what might be ‘broken’ in my setup?
Thanks,
Ken
July 3rd, 2007 at 8:52 am
Sorry for the huge delay on getting back to you on this, Paul. I’m not sure what the problem is for you, but I would troubleshoot it by verifying that you do, in fact, have permissions to access messages in the folder that this hyperlink points to.
You can take an Outlook URL like that and go to Start->Run, paste the hyperlink into the run box, hit enter, and it should pull up the message.
Keep in mind that my code moves the message to a folder called “saved” that is a subfolder under the default Inbox folder. If you have something different for your setup and haven’t adjusted the macro for it, you should do so.
July 3rd, 2007 at 9:19 pm
Ken, I haven’t tried any of this with Vista or Office 07. But off the top of my head, I’m guessing Outlook 2007 does message URIs differently. In my code, I take the EntryID of the message and prefix “Outlook:”. That’s the way it works for Outlook 2003. No idea how it might work in 2007.
July 29th, 2007 at 9:59 am
Hi
I’m very interested in the outlook macro that creates the link to paste into gyroq.
I’ve copied the code but get a message that macros are disabled in the host application. Any suggestions please
August 14th, 2007 at 10:16 am
Rob, I think your error message is coming from Outlook saying that it won’t run your Macro. This is an Outlook security feature.
If you go to the Tools menu, under Macro, and then Security…, you’ll see your current security setting and you can change it. Just to test if this is your probably, you might temporarily set it to Low, to allow all macros to run.
If that fixes the problem, you might consider changing the security setting to something higher that still works for you.
I actually used the “Digital Certificate for VBA Projects” tool under Microsoft Office Tools on the Start menu to create my own digital certificate that I could then use to sign my own macro. To sign the macro, in the VBA editor with the macro open, I selected “Digital Signature” from the Tools menu, and I selected the digital signature I’d created in the previous step. Then I went into those macro security settings mentioned above, set it to High, and added my own certificate to the list of Trusted Publishers.
Again, if you can stomach low security settings, I think you could just turn them off and not hassle with all of this. I can’t, so I jumped through the hoops to make it work.
November 26th, 2007 at 10:01 am
Here’s an update to “turning an outlook email into a ResultsManager activity” saga.
http://nodeglue.com/blog/excited-about-mindreader/
This technique drops the use of ActiveWords altogether and incorporates GyroQ and MindReader.