I have noticed that Outlook for web now exposes the message ID, if a message is selected (tested on Office 365).
So I have asked an LLM to write me a bookmarklet and with a bit of testing I got the following which copies a functioning markdown link to the message (and adds any selected text in the browser to the clipboard with it). Works best when messages are not grouped into conversations. Hope it is of use to someone and that one day something similar can be built into the official clipper.
javascript:(function() {
var url = window.location.href;
var match = url.match(/\/id\/([^/]+)/);
if (match && match[1]) {
var messageID = match[1];
var permanentUrl = 'https://outlook.office.com/owa/?ItemID=' + messageID + '&viewmodel=ReadMessageItem&path=&exvsurl=1';
var selectedText = window.getSelection().toString().trim();
var markdownLink = '[(message link)](' + permanentUrl + ')';
var result = selectedText ? '"' + selectedText + '" ' + markdownLink : markdownLink;
var tempInput = document.createElement('input');
document.body.appendChild(tempInput);
tempInput.value = result;
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('Copied to clipboard:\n' + result);
} else {
alert('Could not find message ID in the current URL. Make sure you\'re viewing a specific email in Outlook Web App.');
}
})();
Pretty cool! Thanks a lot for sharing the code, and such a possibility. I hope we’ll include support of Outlook for web into the next WebClipper release