Flux and Mutability - GTDThe mutable notebook of David Jadehttp://blog.mutable.net/
http://www.rssboard.org/rss-specificationBlogEngine.NET 2.5.0.6en-UShttp://blog.mutable.net/opml.axdhttp://www.dotnetblogengine.net/syndication.axdDavid JadeFlux and Mutability0.0000000.000000How to hyperlink to Microsoft Outlook messages<p>First, a little context on why I wanted to do this in the first place. If you just want to get the source code then just scroll down to the "The source code".</p>
<p>A fair number of the things that make it on to my ToDo list are messages that I receive in Outlook. I've been using Outlook's flags to mark these items for follow up so that I could keep track of them. I use a different colored flag that denotes its own meaning as defined by me. This way I can flag an item using a action type (ToDo, Deferred, Waiting For, etc...). This has worked fairly well for me but once I had a large number of items flagged&nbsp;in Outlook (did I mention that I am a procrastinator?) it didn't really help me keep track of the things I needed to keep track of in any meaningful way. All I could even see was the complete list of flagged items but I couldn't break it down further into projects or context.</p>
<p>To overcome this limitation I've recently started managing my ToDo list outside of Outlook in a program called <a href="http://MyLifeOrganized.net" target="_blank">MyLifeOrganized</a>&nbsp;(aka MLO) . MLO allows you to drag/drop Outlook items into MLO's task list. When you do this it creates a new MLO task using the subject of the dropped Outlook item for the task name. However MLO does something else really smart when you drag/drop an Outlook item. It not only put the text of the Outlook item into the notes, it will also create a hyperlink that will open up the original Outlook item when clicked. It does this by using Outlook's URL syntax which looks something like this:</p>
<blockquote>
<p><strong>Outlook:&lt;entry_id&gt;</strong> where &lt;entry_id&gt; is an Outlook Entry ID</p>
</blockquote>
<p>Windows naturally understands this form of URLs. If you click on one&nbsp;it will cause Outlook to open the item referenced. This has allowed me to take Outlook items and create MLO items simply by dragging them to the MLO task list. In most cases this feature in MLO does exactly what I want, take an Outlook message that I need to follow up on and place it into my ToDo list. However sometimes this isn't exactly what I want. Sometimes I just want to place a link to Outlook items in the notes of an existing MLO item. Unfortunately MLO doesn't support this but there is a way to do it if you willing to do a little macro work in Outlook.</p>
<p><em><strong>Update 6/4/2007:</strong> If you are using Office 2007 then you will probably need to enable the Outlook URL protocol handler so that hyperlinks to mail messages work.To do this requires editing the registry. You simple need to create these registry keys (substituting your installation paths of course):</em></p>
<blockquote>
<ul>
<li><strong>HKEY_CLASSES_ROOT</strong>
<ul>
<li><strong>outlook</strong><br />(Default) = URL:Outlook Folders<br />URL Protocol<strong>=</strong>""
<ul>
<li><strong>DefaultIcon</strong><br />(Default) = "C:\PROGRA~1\MICROS~2\OFFICE12\OUTLLIB.DLL,-9403"</li>
</ul>
<ul>
<li><strong>shell</strong>
<ul>
<li><strong>open</strong>
<ul>
<li><strong>command</strong><br />(Default) = "C:\PROGRA~1\MICROS~2\OFFICE12\OUTLOOK.EXE" /select "%1"</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</blockquote>
<h2>The source code</h2>
<p>Below is the source for a two VB macros that can be added to Outlook. These macros will loop over all of the currently selected messages, getting the subject and Outlook EntryID for each message. With these two pieces of information they then build a string of text with the message's subject and its Outlook URL, each on their own line. It extends this text string for each selected message&nbsp;and places the resulting text string on the clipboard. The end result is one block of text that contains the message subject followed by the Outlook URL for each selected message. This text can then be pasted into any document that understands hyperlinks. This includes the notes of MLO items as well as all of the other Microsoft Office applications. This macro will work with multiple items selected in the main Outlook window as well as from the opened window of a single Outlook message. To use it, simple invoke the CopyItemIDs() macro. You can bind this macro to a menu or toolbar button for easier access within Outlook.</p>
<p><em><strong>Note: </strong>I should mention that if you are using Microsoft Exchange server, the message Entry ID can change on you and break any existing Outlook URLs. This unfortunately always happens if you move a message to another folder so if you plan on using this, only invoke this macro after you&nbsp;have moved&nbsp;the message to a new folder.</em></p>
<p><em><strong>Update: </strong>There is just one more thing you must do before you run this script. You need to include a reference to FM20.dll, which is the Forms 2.0 library. This will allow you to use the DataObject to manipulate the clipboard. Thanks to 'Some Guy' who pointed this omission out.</em></p>
<div id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:543d21a2-3d87-451c-a2d3-d9ff81ec2ae2" class="wlWriterSmartContent" style="display: inline; float: none; margin: 0px; width: 496px; padding: 0px;">
<pre class="brush: vb;">Sub CopyItemIDs()
Dim myOLApp As Application
Dim myNameSpace As NameSpace
Dim currentMessage As MailItem
Dim ClipBoard As String
Dim DataO As DataObject
' Housekeeping: set up the macro environment
Set myOLApp = CreateObject("Outlook.Application")
Set myNameSpace = myOLApp.GetNamespace("MAPI")
' Figure out if the active window is a list of messages or one message
' in its own window
On Error GoTo QuitIfError ' But if there's a problem, skip it
Select Case myOLApp.ActiveWindow.Class
' The active window is a list of messages (folder); this means there
' might be several selected messages
Case olExplorer
' build the clipboard string
For Each currentMessage In myOLApp.ActiveExplorer.Selection
ClipBoard = GetMsgDetails(currentMessage, ClipBoard)
Next
' The active window is a message window, meaning there will only
' be one selected message (the one in this window)
Case olInspector
' build the clipboard string
ClipBoard = GetMsgDetails(myOLApp.ActiveInspector.CurrentItem, _
ClipBoard)
' can't handle any other kind of window; anything else will be ignored
End Select
QuitIfError: ' Come here if there was some kind of problem
Set myOLApp = Nothing
Set myNameSpace = Nothing
Set currentMessage = Nothing
Set DataO = New DataObject
DataO.Clear
DataO.SetText ClipBoard
DataO.PutInClipboard
Set DataO = Nothing
End Sub
Function GetMsgDetails(Item As MailItem, Details As String) As String
If Details &lt;&gt; "" Then
Details = Details + vbCrLf
End If
Details = Details + Item.Subject + vbCrLf
Details = Details + "Outlook:" + Item.EntryID + vbCrLf
GetMsgDetails = Details
End Function</pre>
</div>http://blog.mutable.net/post/2006/09/02/how_to_hyperlink_to_microsoft_outlook_messages.aspx
http://blog.mutable.net/post/2006/09/02/how_to_hyperlink_to_microsoft_outlook_messages.aspx#commenthttp://blog.mutable.net/post.aspx?id=7baa1c87-ffbd-4fe8-8366-d3c2cede5d9eSat, 02 Sep 2006 01:11:00 -0700GTDProductivityProgrammingDavid Jadehttp://blog.mutable.net/pingback.axdhttp://blog.mutable.net/post.aspx?id=7baa1c87-ffbd-4fe8-8366-d3c2cede5d9e19http://blog.mutable.net/trackback.axd?id=7baa1c87-ffbd-4fe8-8366-d3c2cede5d9ehttp://blog.mutable.net/post/2006/09/02/how_to_hyperlink_to_microsoft_outlook_messages.aspx#commenthttp://blog.mutable.net/syndication.axd?post=7baa1c87-ffbd-4fe8-8366-d3c2cede5d9eTip: Automatically tracking email responses<p>Here&rsquo;s a tip for tracking important email responses that you&rsquo;re waiting for. Many email clients these days support flagging or labeling items as well as rules for processing items. I use Outlook as my email manager which has a robust set of rules and in the 2003 version, something called &ldquo;search folders&rdquo; which are saved searched that you can quickly access. Using Outlook I can set up folders to automatically sort all of my emails with a certain flag into one place for quick access. In my email system I use flags for managing the flow of &ldquo;Next Actions&rdquo; as defined in <a href="http://www.43folders.com/2004/09/08/getting-started-with-getting-things-done/" target="_blank">GTD</a> (Getting Things Done by <a href="http://www.davidco.com" target="_blank">David Allen</a>). Right now I have a fairly simple set of flags that I use, &ldquo;Action&rdquo;, &ldquo;Deferred&rdquo;, and &ldquo;Waiting For&rdquo;. Anything else that is not flagged is by default considered reference information (or completed actions if I have checked them off).</p>
<p>The &ldquo;Action&rdquo; and &ldquo;Deferred&rdquo; flags are pretty self-explanatory; it means that there is an action (or possible future action) that I need to perform; usually something that takes more time than a quick response. &ldquo;Waiting For&rdquo; is also fairly self-explanatory but its use is sometimes a little more complicated in practice.</p>
<p>In most cases I use it to simple flag something that I am waiting for, such as flagging an order shipment email or flagging something important that someone has told me they would follow up on. Where it gets more complicated is when I need to track a request that I am sending to someone. In those cases I use a special rule to flag a copy of the item as &ldquo;Waiting For&rdquo;. In Outlook I have a rule set up that checks for emails that I have Cc&rsquo;s to myself. When Outlook&rsquo;s rule engine finds those items it marks them as read and flags them as &ldquo;Waiting For&rdquo;. Now whenever I want to track a request to someone, I just Cc myself on the request and a reminder will automatically be generated and filled in my &ldquo;Waiting For&rdquo; folder.</p>http://blog.mutable.net/post/2006/08/05/tip_automatically_tracking_email_responses.aspx
http://blog.mutable.net/post/2006/08/05/tip_automatically_tracking_email_responses.aspx#commenthttp://blog.mutable.net/post.aspx?id=d240d501-e639-4b6d-bae6-c66e09014868Sat, 05 Aug 2006 18:33:00 -0700GTDProductivityTechnologyDavid Jadehttp://blog.mutable.net/pingback.axdhttp://blog.mutable.net/post.aspx?id=d240d501-e639-4b6d-bae6-c66e090148680http://blog.mutable.net/trackback.axd?id=d240d501-e639-4b6d-bae6-c66e09014868http://blog.mutable.net/post/2006/08/05/tip_automatically_tracking_email_responses.aspx#commenthttp://blog.mutable.net/syndication.axd?post=d240d501-e639-4b6d-bae6-c66e09014868