diff --git a/config.org b/config.org index 08982fc..053d914 100644 --- a/config.org +++ b/config.org @@ -683,6 +683,52 @@ end_src (use-package ivy-hydra :ensure t) +END_SRC +* outlook +In outlook a macro is necessary, also a reference to FM20.DLL +(Microsoft Forms 2.0 Object Library, in c:\windows\syswow64\fm20.dll) +The macro copies the GUID of the email to the clipboard +Attention: the GUID changes when the email is moved to another folder! + +The macro: +#+BEGIN_SRC +Sub AddLinkToMessageInClipboard() +'Adds a link to the currently selected message to the clipboard + 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 +#+END_SRC + +#+BEGIN_SRC emacs-lisp + (use-package org + :config + (org-add-link-type "outlook" 'my--org-outlook-open)) + + (defun my--org-outlook-open (id) + (w32-shell-execute "open" "outlook" (concat " /select outlook:" id))) + + (defun my/org-outlook-open-test () + (interactive) + (w32-shell-execute "open" "outlook" " /select outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000"))' +#+END_SRC + + +(w32-shell-execute "open" "outlook" " /select outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000") + + +[[outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000][MESSAGE: AW: Offene LS Doray (Dennis Cornels)]] + + +[[outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000]] * misc #+begin_src emacs-lisp @@ -1302,7 +1348,7 @@ In status buffer: #+BEGIN_SRC emacs-lisp (use-package magit :ensure t - :pin melpa-stable + ; :pin melpa-stable :defer t :init ; set git-path in work environment