Using the Shared Email Templates macros, you can easily avoid repetitive actions and automatically attach files, insert pictures, and fill in the Bcc, Cc, or Subject field in your emails. You can also add dynamic content, dropdown lists, and fillable fields to your templates.
On this page, you'll find instructions on how to use macros.
To download a quick How to use macros cheat sheet, click the button below:
Download cheat sheet
To add a macro, take the following steps:
The macro is inserted. It's shown in the text of the template with a macro placeholder:
Every time you paste the template into your email message, the full name of the recipient will be inserted automatically.
Try out all the macros to discover how to simplify your email routine with them.
To put some email addresses or text into email fields, you can use the ~%Fill macro or the ~%Add macro.
By default, the text added by the ~%Add macro is inserted after the text that is already in the Subject field. If you want the text of interest to be added to the beginning of the Subject, select the Before checkbox when inserting the macro:
Attach files from OneDrive, SharePoint, or a URL with the ~%Attach macro. Or, use the ~%WhatToAttach macro as a reminder. Here is the detailed guide: How to attach files to your templates
To insert images from OneDrive, SharePoint, or a URL, use the ~%InsertPicture macro. For more information, visit the How to insert pictures into your templates page.
If you want to insert the Subject field contents into the message body, use the ~%Insert macro. This macro can also help you add the current date and current time to your email message.
Use the ~%Insert macro to insert the contents of the To, Cc, or Bcc field into the message body.
You can insert the first, full, or last name of the recipient or the sender into the message body with the ~%Insert macro.
Easily add mailbox, profile, and team properties to your templates with the ~%Insert macro. Here is the How to use team, profile, mailbox properties guide.
Use the ~%DatasetValue macro to add a fixed value from a dataset. Here is the manual.
To explore all the possibilities the ~%WhatToEnter macro offers, visit this help page:
Create templates with fillable fields, dropdown lists, etc.
The ~%Clear macro will help you clear the message body as well as the To, Cc, Bcc, and Subject fields.
With the ~%DisableIf macro, a template won't be pasted if the condition that you specified is met.
To leave an inner note in a template for yourself or your teammates, use the ~%Note macro. It's present only in the template itself and doesn't change an email message.
In the template preview mode, the macro placeholder looks like this:
To see the text of a note, simply hover the cursor over the macro placeholder. To open the note, click the macro placeholder:
You can create appointments and schedule meetings with the help of templates and use the ~%Fill, ~%Add, and ~%Insert macros in them. Detailed information is available on the Use Shared Email Templates in Outlook Calendar page.
To personalize templates for mail merge campaigns, use the ~%MergeField macro. Here is the step-by-step guide.
If you want to combine two macros making them work together for you, just nest one of them in the other.
Suppose you would like not only to automatically fill in the Subject line with some text but also to have the opportunity to change this text if necessary. In this case, you'll need to nest the ~%WhatToEnter macro in the ~%Fill macro:
This is an example of how the HTML code will look like:
~%Fill{"field":"subject","value":"~%WhatToEnter{\"type\":\"text\",\"title\":\"Text for Subject line\",\"defaultValue\":\"A very important reminder\",\"required\":false}"}
When you paste a template containing such HTML code into your email message, you'll see a dialog window showing the text for the Subject line. You can always change this text if you want to.
For a detailed description of each macro, including syntax and examples of use, refer to the Complete list of macros.