Skip to content

Instantly share code, notes, and snippets.

@mcrosson
Created July 29, 2024 16:29
Show Gist options
  • Save mcrosson/d96894d5841084a6d3525f8d3cbfa3ad to your computer and use it in GitHub Desktop.
Save mcrosson/d96894d5841084a6d3525f8d3cbfa3ad to your computer and use it in GitHub Desktop.
A simple handler for `outlook:` links -- swap `mailto:` for `outlook:` and emacs/org-mode will open the link as a new message
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; outlook email handling - windows only
(setq org-outlook-location (w32-short-file-name "C:/Program Files/Microsoft Office/Office16/OUTLOOK.EXE"))
(defun org-outlook-open (url)
(w32-shell-execute
;; Note: org strips "outlook:" from the link URL
"open" org-outlook-location (concat "/c ipm.note /m " url)))
(org-link-set-parameters "outlook" :follow 'org-outlook-open)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment