On reading this blog post, you'll learn how to automatically switch images, attachments, and text in a shared Outlook template, depending on the current user.
Let's say, you have a really nice template, and your teammates would be happy to use it in their correspondence, but you're stuck on making this template dynamic. The problem is that each of your colleagues would like to get a different image, an individual attachment, and some specific text added to the template every time they use it. So, when the template is going to be pasted into the email body by another person, all this stuff should change automatically.
Do you think that such a task is too difficult? Nothing of the kind ... for our smart Shared Email Templates add-in :) Just a few steps to take, and a dynamic Outlook template for your team will be ready.
First, make sure you have all the necessary variables in one and the same Excel table stored, say, in OneDrive. How would you do that? Check both the structure and the content of your table:
At this stage, your table may be like this one:
The email addresses, which your teammates' Shared Email Templates accounts are registered to, are in column A. The email addresses in my screenshots are imaginary—just to give you an example :)
Column B ('Image'), column C ('Text'), and column D ('Attachment') are still empty and have to be filled. Let's get proper data for them.
Note. Don't forget to share these files beforehand. Otherwise, your colleagues won't have access to them.
Note. Make sure that the email address of your teammate who the image is intended for is in the same row:
Now, it's time to deal with text.
If you're happy with plain text that has no formatting at all, simply type the required extracts one by one in an individual cell each (on the right of the corresponding email address, of course). The add-in will bring this text to your template as is.
Would you rather get some phrases bold, colored, or printed in italics? If so, format them with standard HTML tags or let the add-in do that for you. Here's how:
Tip. You can also copy these lines from View Template Content.
Tip. If there are line breaks in your text, select the cell of interest, and paste the text directly into the formula bar to avoid splitting.
As for the files that should be attached, process them with the ~%AttachFromOneDrive macro:
Convert your Excel table into a Shared Email Templates dataset. Here are the detailed instructions: Connect Excel table.
Finally, your dataset is ready, and all you need do is modify your template.
Let two macros of ours—~%DatasetValue and ~%ProfileProperty—work for you :)
Congrats! :) You've just nested the ProfileProperty macro within the DatasetValue one. Would you like to know what for? :) The ProfileProperty macro will bring the current user's email address and thus 'point out' the right direction for the DatasetValue macro. In its turn, the DatasetValue macro will track down the right cell in your dataset and fetch the image of interest that the ~%InsertPictureFromOneDrive macro returns.
The way of providing the current user with a specific piece of text doesn't differ substantially from getting a different image for them:
From now on, the macros operating in coalition will easily find the email address of the current user in the specified dataset and return the text this colleague of yours needs.
With practiced ease :) insert one more DatasetValue macro in the text of your template. This time, it is necessary for bringing an individual attachment to each user.
Hooray—your dynamic template is ready :) The part you've just modified may look like this:
If I'm the current user, the template pasted into the email body will include the below attachment, image, and text:
If it's my colleague Alex who is the current user, the same set of macros will bring another combination of inserted items for him:
If the current user is my colleague Kate, the inserted attachment, image, and text will be as follows:
Now you know the secret to creating dynamic Outlook email templates and can tell it to your colleagues. Or ... you can keep it and become indispensable for your team ;)
Why Shared Email Templates? Top 10 reasons (.pdf file)
Table of contents