How to use macros in templates

In Shared Email Templates for Outlook

Macros let you not only avoid performing repetitive actions but also add dynamic content, drop-down lists and fillable fields to templates. For example, macros allow creating templates with attachments, so that each time you write a certain kind of message, you don't have to remember to add a particular file. You can fill in the Bcc, Cc, Subject email fields, add information to the message body, and a lot more.

On this page, find the list of available macros and instructions on how to use them. You can also refer to the –°omplete list of macros page to get a list of all macros and their descriptions.

Note. Please note, the add-in supports a maximum of one nested level of macros. For instance, you can put a macro into another macro, e.g. ~%Macro1[~%Macro2] , and this will work fine. But if you add a second nested level, e.g. ~%Macro1[~%Macro2[~%Macro3]], the tool will not work.

How to add macro to your template

To add a macro, take the following steps:

  1. Select an existing template or create a new one and click Edit:
    Edit template.
  2. In the text of the template, place the cursor where you want to put a macro, click the Insert Macro icon, and select the macro you want to use.

    For example, we select the ~%InsertReipientFirstName macro that inserts the first name of the recipient:
    Select your macro.

    Now recipient's name will be pasted automatically each time we use this template:
    Template with macro.

What macros do and how to use them

Find the activity you'd like to implement and the corresponding macro you can use. If this is your first acquaintance with macros, we recommend that you read this section carefully and try out all the macros yourself to discover how they can simplify your emailing routine.

Tip. You can use nested macros as long as they do not exceed one nested level.
For example, feel free to create such macros as ~%FillSubject[~%Date], ~%WhatToEnter[~%InsertRecipientFirstName;~%To], ~%AddSubject[Dear ~%InsertRecipientFullName], etc.
Note. Please keep in mind that the entire macro text has to be of consistent formatting, otherwise, the macro won't work:

If your macro may have inconsistent formatting, select the entire macro text and click the Clear Formatting icon in the toolbar:

Fill in email fields: To, Cc, Bcc, Subject

Note. With all macros in this group, it doesn't matter where in the text of a template you insert a macro. These macros put the needed information into the email fields, you won't see them in the message body.
Tip. By default, the name of the template is pasted to the Subject field of the email. If you do not want this to happen, use the ~%FillSubject or ~%AddSubject macro without any text in the square brackets: ~%FillSubject[] or ~%AddSubject[].
  • The ~%FillTo, ~%FillCc, ~%FillBcc macros insert the specified email addresses (separated by semicolons) into the To, Cc, Bcc, fields accordingly. Any previously added addresses will be deleted.
  • The ~%FillSubject macro inserts the specified text into the Subject field. Any previously added text in the Subject field will be deleted.
  • The ~%AddTo, ~%AddCc, ~%AddBcc macros add the specified email addresses (separated by semicolons) to the To, Cc, Bcc fields accordingly. All the previously added addresses will be kept.
  • The ~%AddSubject macro adds the item to the Subject field. The previously added to the Subject field text will be kept.

    Tip. By default, the macro adds text to the end of your Subject, so if you already have "Subject 1" in your Subject field and use ~%AddSubject[Subject 2], you'll get "Subject 1Subject 2".

    However, if you want the text to be added to the beginning of your Subject, you can use the ";{before}" element after your text in square brackets: ~%AddSubject[your text;{before}]

    So, to get "Subject 2Subject 1" in your Subject field, use the macro as follows: ~%AddSubject[Subject 2;{before}].

    Tip. When you use ~%AddSubject, the utility doesn't add any separators or spaces between the inserted text units in the Subject field, so bear in mind to add a space or separator yourself.

    To use the macro, insert it into your template and replace "" with the necessary email address, in case of ~%FillSubject/~%AddSubject replace "Text" with the necessary text.

    Examples of use:


Known issue. Please note that email addresses, text, and the macro must be of consistent formatting. If you copy an email address or text from some other resources or a web page, they will be pasted into a template in their original formatting, and the macro won't work. So, we recommend that you type in the needed text manually to avoid formatting problems.

How to attach files to emails with macros

  • To attach files, you can use the ~%AttachFromOneDrive, ~%AttachFromSharepoint, ~%AttachFromURL, and ~%WhatToAttach macros. Please see the detailed guide on the How to attach files to your templates page.

How to insert images into message body with macros

  • To insert images, you can use the ~%InsertPictureFromOneDrive, ~%InsertPictureFromURL, ~%InsertPictureFromSharePoint macros. Please see the detailed guide on the How to insert pictures into your templates page.

How to add information to message body

Add subject, date, time

Note. As these macros add information to the message body, make sure to put the cursor right to the place of a template where you want to see this information.
  • The ~%Subject, ~%Date, ~%Time macros insert the content of the Subject field or the current date and current time into the message.

    Examples of use:
    If you have any questions regarding ~%Subject, please let me know.
    This message is composed and sent on ~%Date.
    This message is composed at ~%Time.

Add addresses from To, Cc, Bcc fields

  • The ~%To, ~%Cc, ~%Bcc macros insert the content of the To, Cc, or Bcc fields accordingly into the message.

    Examples of use:
    The information contained in this message is intended only for ~%To.
    Please note, the copy of this message is sent to ~%Cc.
    Please note, the copy of this message is sent to ~%Bcc.

Insert recipient and sender names

Note. These macros may not work in some cases because of Outlook bugs.
  • The ~%InsertRecipientFirstName, ~%InsertRecipientFullName, ~%InsertRecipientLastName macros insert the first, full, or last name of the recipient into a message if the name is displayed in the To field. Otherwise, the email address is inserted.

    Examples of use:
    Hi ~%InsertRecipientFirstName
    Dear ~%InsertRecipientFullName
    Dear Mr. ~%InsertRecipientLastName

  • The ~%InsertSenderFirstName, ~%InsertSenderFullName, ~%InsertSenderLastName macros insert the first, full, or last name of the sender into a message.

    Examples of use:
    Warm regards, ~%InsertSenderFirstName
    Sincerely, ~%InsertSenderFullName
    Best wishes, ~%InsertSenderLastName

Paste profile and team properties

Add value from dataset

Enter text or pick date with ~%WhatToEnter macro

Clear message body & check account

  • The ~%ClearBody macro clears the message body when you insert a template into your message. So, if you may have some unneeded text in your message body, use this macro in your templates.
  • Pick ~%FromAccount if you use shared mailboxes and want to make sure your messages are sent from the correct accounts. Into the square brackets, enter an Outlook account from which the email should be sent, e.g. ~%FromAccount[]. While template inserting, the macro will check if the account in the From field is the same as the account you entered. If they differ, the template won't be pasted.

Add inner note to template

  • You can use the ~%Note macro to leave an inner note in a template for you or your teammates. The macro does nothing to your message when you use a template that contains it, the macro is present only in the template. To use it, enter your note into the square brackets.

    Examples of use:
    ~%Note[Only for corporate customers]
    ~%Note[Contracts before 01.01.2020]

    In the preview mode, when you stand on the template, notes look like this:
    Closed note in the preview.

    To see the text of notes, simply click on them:
    Opened note in the preview.

Create meetings and appointments in Outlook Calendar

You can create appointments and schedule meetings with the help of templates and use the ~%FillLocation, ~%AddLocation, ~%Location, ~%FillSubject, ~%AddSubject, ~%AddTo, ~%FillTo, ~%AddCc, ~%FillCc macros to fill in some fields.

See the detailed manual on the Use Shared Email Templates in Outlook Calendar page.

–°omplete list of macros

You can find the full list of all Shared Email Templates macros with syntax and examples on the Complete list of macros page.


Vignas Gunasegaran says:
February 15, 2021 at 4:25 pm

I have unique links that I send a lot, I would l like the hyperlink to be "click me" style but is there a quick way to get that added in when i start the snippit via what to enter?


Hello Vignas,

Thank you for your question.

If you'd like to quickly insert a unique hyperlink into an email depending on the context of your message, I'd recommend using the ~% WHAT_TO_ENTER[] macro in the combination with Dataset. I have just sent you the detailed instructions by email.

In case you have any questions or need further explanation, please do not hesitate to email back.



I just cannot get the results from the ~%WHAT_TO_ENTER[] macro you posted above here.
The syntax of Pick Date ist unclear as well as I do not get the result even when trying to copy your examples here.I still get the Question Box (which does look different then yours given here) and everything is an item from the dropdown list, that's it.
Can you please provide the full syntax and potential options ?


Hello Lars,

Thank you for your comment. Sorry to hear that the instructions above are not clear for you.

If you'd like to insert a date into a certain place in your message using the ~%WHAT_TO_ENTER[] macro, please do the following:

- Click the New button at the bottom of the add-in pane to create a new template.
- Type in the template text and put the cursor where you'd like to insert a date. Then open the Insert Macro drop-down and choose ~%WHAT_TO_ENTER[] from the list.
- You will see the What To Enter dialog window with three fields. Click on the down arrow in the top field and select "Date".
- Enter the title for the window that will appear when inserting the template, for example, "Due date".
- Then click Insert, the macro will look as follows: ~%WHAT_TO_ENTER[{date,title:"Due date"}].
- Save the template and try to insert it into the email. When you do this, you will see the dialog box called "Due date" with the current date. You can click on the down arrow in the date field to open the calendar and pick another date.

If your case is different, then please explain in detail what you'd like to do and we'll help you with creating a necessary macro. Feel free to email us at for further assistance.


Hello, is it possible to get multi-line text as WHAT_TO_ENTER value?


Hello Giuseppe,

Thank you for your question. I have just replied to your query by email. Please check your Inbox.

Luca Balbinot says:
January 26, 2021 at 5:27 pm

Hello Katerina, i have the same question as Giuseppe. Thank you.

Hello Luca,

Thank you for your question. Yes, it is possible to enter multiple items in the ~%WHAT_TO_ENTER macro choosing the Dropdown list option. Please find the detailed manual here:

Kelvin Niss says:
May 8, 2020 at 3:59 pm

I'm trying to use the WHAT_TO_ENTER to have it in a drop-down list, however it always appears to me like the last example, an empty box to type the information. Is there anything i can do to have it in a list?


Hello Kelvin,

If you want to have a drop-down list to be displayed when inserting the ~%WHAT_TO_ENTER[] macro, you should enter list items through a semicolon in the square brackets next to the macro name like in the example above, ~%WHAT_TO_ENTER[Item 1; Item 2; Item 3].

If you mean something different, then please send us the HTML code of your template for checking. Simply select the template you're having difficulties with and hit Edit. Then, find and click the icon to open the View HTML pane. Select all the text you see in the HTML window, copy it, paste in a Word document and send it to We'll try to help.


There are times where I want to use ~%WHAT_TO_ENTER[] to get some information and then use it again later, but I don't want to have to ask again. Can you consider adding the ability to store and access variables? Something like ~%SAVE_TO_VARIABLE[1, Prompt Message] and ~%USE_VARIABLE[1]. You could use indexes to reference which variable to save and use and limit a template to say 10, 20, or whatever number makes sense.



Hello Michael,

I have just replied to your query by email. Please provide us with the information requested in the email so that we'll be able to help you better. Thank you.


Same question.
Typically I want to use a ~%WHAT_TO_ENTER[] entry into body message AND into Subject field without typing twice.


Hello Patrick,

Good idea! I have just added it to our backlog. I will discuss with developers and definitely include it to the next build. Thank you.


Please ignore my previous comment.

You can use a WHAT_TO_ENTER macro with the same "window title". In this case, you will be prompted once. Plus, you can nest the WHAT_TO_ENTER macro into any *SUBJECT macro. Thank you.

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