Created
September 7, 2012 13:56
-
-
Save webframp/3666453 to your computer and use it in GitHub Desktop.
Directly link to Outlook 2007 email from emacs org-mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; org-outlook.el - Support for links to Outlook items in Org | |
;; via: http://superuser.com/questions/71786/can-i-create-a-link-to-a-specific-email-message-in-outlook | |
;; | |
;; use (require 'org-outlook) in init.el | |
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\outlook] | |
"URL Protocol"="" | |
@="URL:Outlook Folders" | |
[HKEY_CLASSES_ROOT\outlook\DefaultIcon] | |
@="C:\\PROGRA~1\\MICROS~3\\OFFICE12\\OUTLLIB.DLL,-9403" | |
[HKEY_CLASSES_ROOT\outlook\shell] | |
@="open" | |
[HKEY_CLASSES_ROOT\outlook\shell\open] | |
@="" | |
[HKEY_CLASSES_ROOT\outlook\shell\open\command] | |
@="\"C:\\PROGRA~1\\MICROS~3\\OFFICE12\\OUTLOOK.EXE\" /select \"%1\"" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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 + ")]]" | |
doClipboard.PutInClipboard | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You solved your problem? :-)