Send file in SharePoint as Outlook Attachment

Markus Kolbeck
Markus' Blog
Published in
2 min readDec 20, 2016

You can send files stored in a SharePoint document library as an e-mail attachment directly from the SharePoint page.

SharePoint provides a functionailty to send a link to a document within an e-mail message. However, sometimes it is desired to send that file as an attachment rather than the link to the document.

Usually, the user would navigate to the SharePoint library, download a copy, create a new e-mail message and then add the attachment (which was downloaded locally).

Of course there are many other options like opening the Office file in the Office application and share it here. Microsoft Office provides this functionality to share documents as Outlook attachments as well. I also know there are some commercial tools available that integrate into Outlook or SharePoint as an add-on to provide this functionality.

However, I decided to give JavaScript a go — and succeeded.

The solution with JavaScript

I managed to add two icons besides each document in a SharePoint library:

  1. the e-mail message icon will provide the functionality to create a new e-mail message and include the link to the file in the body
  2. the attachment icon will create a new e-mail message and automatically attach the file stored in SharePoint to the e-mail message

If you want to give this approach a try, here is the JavaScript code. You will have to add it as JSLink to the list viewer web part. Also, you will have to create an additional column for that library called “Share” and format it as a calculated column.

--

--