Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Outlook as my email client at work, but I don't want to use it to manage my tasks and todos. (Instead I use plain text files and Emacs org-mode.) Since many todo items start out as mails in my inbox, I often need to reference these mails.

Is there some clever way to create a link (a URL) that opens a specific email in Outlook when clicked?

share|improve this question
Would anybody with sufficient reputation retag this question, please? We are talking about (TAG =>) "org-mode". – Keks Dose Jan 30 '12 at 13:43
up vote 26 down vote accepted

You can do this with a little bit of code in Outlook and a little bit of code in Emacs.

First, if you're using Outlook 2007 you'll need to enable Outlook URLs with a registry addition. Instructions and the registry file can be found here courtesy of David Tan.

Next, this macro can be added to Outlook and will get the GUID of the current email message, create a Org-Mode link and deposit it into the clipboard.

'Adds a link to the currently selected message to the clipboard
Sub AddLinkToMessageInClipboard()

   Dim objMail As Outlook.MailItem
   Dim doClipboard As New DataObject

   'One and ONLY one message muse be selected
   If Application.ActiveExplorer.Selection.Count <> 1 Then
       MsgBox ("Select one and ONLY one message.")
       Exit Sub
   End If

   Set objMail = Application.ActiveExplorer.Selection.Item(1)
   doClipboard.SetText "[[outlook:" + objMail.EntryID + "][MESSAGE: " + objMail.Subject + " (" + objMail.SenderName + ")]]"

End Sub

Almost there, add this little bit of lisp to your emacs lisp directory to enable Outlook links.

;;; org-outlook.el - Support for links to Outlook items in Org

(require 'org)

(org-add-link-type "outlook" 'org-outlook-open)

(defun org-outlook-open (id)
   "Open the Outlook item identified by ID.  ID should be an Outlook GUID."
   (w32-shell-execute "open" (concat "outlook:" id)))

(provide 'org-outlook)

;;; org-outlook.el ends here

And lastly, update your .emacs file to include the Outlook link code. Just add this somewhere after org-mode is setup.

(require 'org-outlook)

Now you can call the macro (I added it to my toolbar in Outlook for quick access) and you can quickly create a link to the email in Emacs.

One gotcha, GUID's change when you move a message between document stores, so if you get the GUID to the message while it's on your Exchange server and then move it to your local PST file the link will change. Move the message before you get the GUID.

share|improve this answer
This is great, thank you! One simplification: I didn't mess with the registry to enable Outlook URLs, instead I just changed the w32-shell-execute call to this: (w32-shell-execute "open" "C:/Programme/Microsoft Office/Office12/OUTLOOK.EXE" (concat "/select " "outlook:" id) – Christian Berg Jan 26 '10 at 15:17
Thanks for this answer. I found out that I somewhat needed to create an empty form to prevent compilation error on undefined DataObject. – Laurent' Nov 5 '11 at 13:24
@ChristianBerg: I'm using Outlook 2003, so maybe I can have hyperlinks without bothering with the registry, but your simplification did not work, Outlook was unable to find the URL. And every time I clicked on a link in Emacs, a new outlook-process was started. So I sticked to the great solution by user259... – Keks Dose Jan 26 '12 at 13:56
This is fantastic ! Thank you for providing this solution. I tried it with outlook 2007 with the registry tweak and it worked like a charm ! I found 1 issue if I ran the macro when I had a meeting invite / appointment selected. The code threw an exception. Since I use it only on the inbox I solved this by Dim objMail as Object instead of MailItem - however this may not be the right solution since the code could still fail if the item selected doesn't have Subject/ SenderName members. The code could probably check if the selected item is of proper type and provide a MsgBox if it is not. – koushik Feb 22 '12 at 15:23
I "scratched this itch" of mine a bit more as I had to record links to some appointments for working on related items (so I can refer ot info / attachments therein or reply all when I have updates etc). Now this can export mails, calendar items, contacts, notes, journal entries and at least will not fail when invoked on other entries. The modified code is at (I can provide a diff if it would help - though I don't know how to make on in VBA). I didn't have to make any other change (emacs-side or regsitry) for this to work on my end. HTH. – koushik Jul 23 '12 at 13:50

came across Linker applet.going to try it may want to as well

Here's the marketing drible..

Linker™ for Windows® creates hyperlinks to items and folders in Outlook, and to files and folders in Windows Explorer. It is a system tray applet places the hyperlink in the Windows clipboard. The hyperlink can then be pasted into any Microsoft Office document, web page, e-mail message, or any document that supports hyperlinks.

Greetings from sunny South Africa!

share|improve this answer
Linker works sometimes, other times not so much. Overall feels quite buggy in Win 7 + Outlook 2010 – Andy Jan 15 '14 at 19:00

I solved this by writing a simple vbscript (download):

Set Outlook = CreateObject("Outlook.Application")
Set SelectedItem = Outlook.ActiveExplorer.Selection.Item(1)
Set Shell = CreateObject("Shell.Application")
Shell.ShellExecute "cmd", "/c echo Outlook:" & SelectedItem.entryID & " | clip", "", "runas", 1

It copies a link of the element (Email, Calendar entry, ...) you have currently selected in Outlook to your clipboard:


You can even use a redirection service so that you get a HTTP link (because Outlook: links are probably not detected automatically if you paste is somewhere, but HTTP links are) (download), just replace the last line with:

Shell.ShellExecute "cmd", "/c echo" & SelectedItem.entryID & " | clip", "", "runas", 1

Note that you need to make Outlook: links working first. (scroll down to "Do It For Me")

Tested with Outlook 2010.

share|improve this answer

Not without some kind of custom code. The Outlook URI's can get you to the containing folder within Outlook, but that's about it. You would need to come up with a clever filing strategy that aligned with your linking strategy to get more granular.

share|improve this answer

I'm not sure about referencing a specific email but depending on your system you might be able to copy the email to the same location as the todo item. Just drag/drop the mail to a folder or the desktop and it will create a copy of the mail that you can treat as a normal file.

If you would be using .doc or more "advanced" files than .txt you could then link to this Outlook message file.

share|improve this answer
I'll go with that solution. Here's my new workflow: Drag the mail to a temporary folder. Create the todo item in org-mode. Add the message file as an attachment to the item: C-c C-a m (the message file is moved to the attachments folder). Later I can open the message from the todo item by pressing C-c C-a o. – Christian Berg Nov 18 '09 at 16:07

I prefer to copy the Outlook Item content to the system clipboard and then yank it into an Org-mode note.

share|improve this answer

Probably your requirement is different with mine.

Outook 2013 > Message Tab(your normal view) > 'Actions' Button > View in Browser

Then I get that link from the browser.

Hope that help

share|improve this answer
This seemed promising but in Outlook 2013 for me this creates a .mht file in AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook` and opens that in IE using a 'mhtml:file://.. url so no go. – Miserable Variable Jan 5 '15 at 17:30

You can copy an Outlook e-mail to OneNote (comes in as a yellow letter icon), then right click and select 'link to paragraph', and then paste the link into another document that can work with links.

But anyway, Microsoft should have made this whole thing of linking to an e-mail a standard feature. It was such a useful feature of Lotus Notes.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .