How to attach files to your templates

In Shared Email Templates for Outlook

With Shared Email Templates, you can attach files from OneDrive, SharePoint, and URLs. Also, you can create an Outlook draft, attach a file to it, and use this draft as a template. Besides, it's possible to set a reminder that a file from your local storage should be attached when you use a certain template.

Click the button below to open or download a quick How to attach files cheat sheet:

Download cheat sheet

Before you start

Pay attention to the following points:

  • There are two ways to attach files: with the help of the Message attachments icon in the template editor or by using the ~%Attach macro. These are two different processes, so files that you attach with the help of the ~%Attach macro won't be shown in the Message attachments dialog.
  • You might face limitations on the size and number of attachments that are different in Office 365, Outlook.com, and Exchange Server.
  • To avoid signing in to your Microsoft account each time you attach files from OneDrive or SharePoint, enable the SSO option.
  • When attaching a file from OneDrive in a template that is shared with other users, make sure that your teammates have access to the corresponding file or folder in OneDrive. You can create a special folder in your OneDrive, share it with all your teammates, and collect all the documents that you share in templates there. For detailed information on managing access in OneDrive, visit the Share OneDrive files and folders page on the Microsoft Support website.
  • When attaching a file from SharePoint in a template that is shared with other users, make sure that your teammates have access to the corresponding file or folder in SharePoint. For detailed information on managing access in SharePoint, visit the Share SharePoint files or folders page on the Microsoft Support website.
  • When you use a template with the ~%Attach macro to attach a file from OneDrive or SharePoint, the macro downloads the chosen file and attaches it to the email message that is currently opened.
  • When you use a template with the ~%Attach macro to attach a file from SharePoint, you have to be logged in to SharePoint so that the macro has access to the file.
  • Attaching files from SharePoint with the ~%Attach macro or Message attachments icon won't work on free accounts, such as Outlook.com, as they don't have SharePoint.
  • When attaching a file from a URL in a template that is shared with other users, make sure that your teammates have access to the specified URL.

Add attachments in the template editor

To select a file that is going to be attached, click the Message attachments icon:

Message attachments

Decide whether you want to attach a file from OneDrive, SharePoint, or URL, and then click the corresponding plus sign on the right:
Click the plus sign.

Attach from OneDrive

If your file is in OneDrive, select it and click Select. Also, you can Upload a file from your local storage to OneDrive and then attach it.
Select your file.

Click Close:
Here is the selected file.

If there are some files attached, the icon will be marked with a blue dot: The Message attachments icon with a blue dot
You can click the icon to see the list of attached files or to add another file if needed.

Attach from SharePoint

If the file is in SharePoint, select it and click Select. Also, you can Upload a file from your local storage to SharePoint and then attach it.
Select your file.

Click Close:
Here is the selected file.

Attach from a URL

Enter the necessary URL and click Add:

Add from URL.

Click Close:

Here is the added file.

Attach files with a macro

You can attach files with the help of the ~%Attach macro.

For more information on how to use macros, visit the How to use macros in templates page.

Attach a file from OneDrive

To attach a file from OneDrive with the ~%Attach macro, you need to click the Insert macro icon:
The Insert macro icon

Into the Search box, type "attach from" to look for the options available. Double-click Attach from OneDrive or select it and click Select:
Select the required option.

If single sign-on is disabled, the add-in will ask you to log in to your OneDrive account.

Choose the file to be attached and click Select. Also, you can Upload your file from your local storage to OneDrive and then attach it.
Select your file.

In your template, the macro will be shown by its placeholder:
The macro placeholder

Attach a file from SharePoint

You can use the ~%Attach macro to attach a file from your SharePoint. Click the Insert macro icon:
The Insert macro icon

Into the Search box, type "attach from" to find the option you need. Double-click Attach from SharePoint or select it and click Select:
Select the required option.

If single sign-on is turned off, the add-in will ask you to log in to your SharePoint account.

Select the necessary file and click Select. Also, you can Upload a file from your local storage to SharePoint and then attach it.
Select your file.

As soon as you insert the macro into your template, the macro placeholder will appear there:
The macro placeholder

Attach a file from a URL

You can attach a file from a URL by using the ~%Attach macro.

Click the Insert macro icon:
The Insert macro icon

Into the Search box, type "attach from" to look for the required option. Double-click Attach from URL or select it and click Select:
Select the required option.

The macro dialog window will appear. Enter a link to the required file, for example "https://domain.com/file-url", and click OK:
Insert the necessary link.

What not to do while attaching files from URLs

When attaching a file from a URL, do not use a link to a file stored in OneDrive or SharePoint. For example, you might want to open your file in a browser, copy its address from the address bar, and try to paste it into the Add from URL or Attach from URL dialog window. This won't work. Or you might want to copy a link to your file when sharing it in OneDrive and paste it into the Add from URL or Attach from URL dialog window. This won't work either.

Use an Outlook draft with an attached file

To attach a file to your template, you can use an Outlook draft as a template. Create a draft in Outlook, attach a file to it, and link a folder containing this draft to Shared Email Templates. Here is our step-by-step guide: How to use Outlook drafts as templates

Attach a file from a local storage

To remind yourself to attach a file from your hard drive or SSD every time you use a certain template, apply the ~%WhatToAttach macro.

When inserting this macro into your template, you'll see a dialog containing the Window title box. Type in any word or phrase that will prompt you to attach the necessary file, for example the name of the file to be attached: Type some text for a reminder.

As a result, when you paste such a template into your email message, the reminding dialog will show up. Click the Browse icon to select the file you need:
Select a file from your local storage.

Single sign-on (SSO) for OneDrive and SharePoint

If you've got only one OneDrive account that is the same as your Microsoft 365 Outlook account (that is indicated in Outlook File → Account information), you can take advantage of single sign-on to avoid entering or confirming your credentials each time you attach files from OneDrive or SharePoint.

With single sign-on, you'll accept the permissions for the app only once: Requested permissions

After that, all files will be attached without any additional pop-ups.

Disable single sign-on

The single sign-on feature is turned on by default. If you need to attach files from different OneDrive accounts, turn single sign-on off. For this, click the three dots in the lower-right corner of the add-in pane and select Profile:
Click Profile.

Click Edit Account:
Here is the Edit Account icon.

Here is the checkbox you need:
SSO

Important notes

Note. The single sign-on feature:

  • Is not supported in the web app. It is available only in the Outlook add-in (desktop or online).
  • Is available only if your Outlook provides mailbox API 1.9 and higher.
  • Works in Microsoft 365 accounts only and isn't supported in free accounts, such as Outlook.com or gmail.com.

You might see an error message in red below the Use single sign-on (SSO) where possible checkbox. In most cases, the message is related to one of the points mentioned above.

However, if you see the 'SSO is not supported in your current add-in version' message, most probably, you simply need to wait a bit till the app is updated in your account. The speed of this process depends on Microsoft and we can't influence it.

Post a comment

Seen by everyone, do not publish license keys and sensitive personal info!

If you have any questions or issues with this add-in, please feel free to post your concerns in the comments area. As soon as we answer, a notification message will be sent to your e-mail. If you do not want to share your thoughts in public, please contact us at support@ablebits.com.