Skip to content

Instantly share code, notes, and snippets.

Created August 21, 2013 14:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Copy "link" to current Outlook message for use in emacs org-mode
Dim oe
Dim mi
Dim strMH
Set myOlApp = WScript.CreateObject("Outlook.Application")
Set oe = myOlApp.ActiveExplorer
If oe.Selection.Count = 1 And oe.CurrentFolder.DefaultItemType = olMailItem Then
Set mi = oe.Selection.Item(1)
Set objMail = mi
Set objIE = CreateObject("InternetExplorer.Application")
objIE.document.parentwindow.clipboardData.SetData "text", "[[outlook:" + objMail.EntryID + "][" + objMail.Subject + " (" + objMail.SenderName + ")]]"
WScript.echo "Mail-Link kopiert: " & mi.subject
WScript.echo "Select one and ONLY one message."
End If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment