Using Hook with Outlook for Mac

#1

I use the following custom scripts with Outlook for Mac. I also use the Outlook handler here to make it a bit cleaner and simpler - set the Hook URL scheme to hook://outlook/document-identifier

Get Name:

tell application "Microsoft Outlook"
    set theMessage to first item of (get current messages)
    set theSubject to the subject of theMessage
end tell

get theSubject

Get Address:

tell application "Microsoft Outlook"
	set theMessage to first item of (get current messages)
	set theID to the id of theMessage
	set the clipboard to {text:(theID as string), Unicode text:theID}
	
	
end tell

get "outlook://" & (the clipboard)

1 Like
Hook Version 1.0-beta (2115) is now available (built 2019-03-07)
#2

Thank you @Corkstu ! I’ve copied this to our internal issue to support Outlook, so that other users can benefit.

#4

Thanks again, @Corkstu. The latest version of Hook now has support for Outlook, including some of the above code.

All: please note that Outlook is not handled as a regular Hook email client.

Our developer notes:

We can integrate Outlook, but not as a proper Hook integrated email client. Hook can create and connect and open links to Outlook messages but they’re not links which are compatible with other mail clients and which work on other machines

The problem is Open Item. We can generate correct hook://email/message-id URLs but opening them in Outlook is too slow to be useable.

Outlook doesn’t use message-id to identify messages, so have to parse and check the header of every single message in outlook to find a match for a given message-id, which can take a long time.

Outlook provides its own unique identifiers which we can use to create and open links to messages, but they are not cross compatible with other email clients, and you can’t send them to anyone else.

We would need to ask Microsoft to ensure Outlook exposes the real message-id per Section 3.6.4 of RFC 5322 - Internet Message Format .

#5

Happy to be involved and help. Thank you for chasing the background/options with Microsoft. You did the professional developer thing, I did the quick and dirty fix!

1 Like