Shared Email Templates for Microsoft Outlook

How to attach files from datasets

With simple datasets in Shared Email Templates, you can easily retrieve not only text values but also files for your email messages. If your dataset contains a file column, you have several options to choose from: simply attach a file, attach a file while inserting the file name into the message body, select a file via a dialog displayed when a template is being inserted, or attach multiple files using tables and lists bound to the dataset.

How to add files to a simple dataset

  1. In a simple dataset that you're creating or editing, open a dropdown menu next to the rightmost column and select File.
    Adding a file column to a simple dataset
  2. Enter the name of the file column.
  3. Click a cell and select a file location: OneDrive or SharePoint.
    Selecting a file location
  4. Select a file.
    Selecting a file

    Tip. You can upload a file from your local storage by selecting the Upload button.

    The Upload button

  5. Repeat Steps 3 and 4 to add other files.
  6. When you're done, save your dataset.
    Saving a simple dataset

How to attach files from datasets using macros

The Attach macro: Attach a file

  1. In a template that you're creating or editing, select the Insert macro button.
    The Insert macro button on the template editor toolbar
  2. Select Attach from dataset.
    The Attach from dataset option
  3. Select a dataset, a file column, and a key value identifying a row from where the file must be retrieved. Then select OK.
    The Attach from dataset dialog
  4. Save your template.

When you insert such a template into an email message, the Attach macro will automatically retrieve and attach the necessary file.
A file attached to an email

The Insert macro: Attach a file and insert its name

  1. Start creating or editing a template. On the template editor toolbar, select the Insert macro button.
    The Insert macro button on the template editor toolbar
  2. Select Insert dataset value.
    The Insert dataset value option
  3. In the Dataset value dialog, select a dataset, a column that contains the necessary file, and a key value that the Insert macro will use to identify the row where the file is. Also, select the Attach file checkbox. Otherwise the macro will only retrieve the file name. Then select OK.
    The Dataset value dialog with the Attach file checkbox selected
  4. Save the template.

When you insert such a template into an email message, the necessary file will be attached, and the macro placeholder will be replaced with the file name.
A file and its name in an email

The WhatToEnter macro: Select a file to attach

  1. When creating or editing a template, select the Insert macro button.
    The Insert macro button on the template editor toolbar
  2. Select What to enter (WTE).
    The What to enter (WTE) option
  3. In the What to enter dialog, select Dataset, enter the field name that will be shown in a dialog prompting you to choose an attachment, and then select the dataset and the column that contain the necessary files. You also need to select the Attach file checkbox. Without it, only the file name will be added to your email. When you're done, select OK.
    The What to enter dialog with the Attach file checkbox selected
  4. Save your template.

When you insert such a template into an email message, a dialog prompting you to select a file to attach will show up. To make it possible for the macro to retrieve the right file, select the corresponding value from the key column of your dataset. Then select OK.
Selecting a file to attach

As soon as you select the key value, the macro will attach the necessary file and add its name to the message body.
A file and its name in an email

How to attach files from datasets using tables

  1. Add a table to a template you're creating or editing. Reserve only one row for the details you want to retrieve from your dataset.
    A table in a template
  2. Right-click the row reserved for the details to be retrieved and select Bind to dataset.
    Binding a table to a dataset
  3. In the Select dataset dialog, enter the field name. It will show up in a dialog prompting you to select dataset key values. Select a dataset. Then choose columns that you want to include in the table and columns from where files must be attached. Select OK.
    Selecting a dataset
  4. Save your template.

When you insert such a template into an email message, a dialog will appear making it possible for you to specify dataset rows for the bound table by selecting dataset key values. When you're done, select OK.
Selecting key values

As soon as the dialog closes, data from the specified dataset rows will be added to the table and the files will be attached to the email.
The filled table and attached files in an email

How to attach files from datasets using lists

  1. In a template you're creating or editing, start creating a list. Right-click the line where the first list item is going to appear and select Bind to dataset.
    Binding a list to a dataset
  2. Enter the field name that will be in a dialog asking you to select values from the key column of your dataset, select the dataset itself, choose columns that will form a list and columns with files to attach. Then select OK.
    Selecting a dataset

When you insert such a template into an email message, a dialog will show up so that you can select key values from the dataset to specify the rows that must be on the list. When you're done, select OK.
Selecting key values

After you select the key values, data from the specified dataset rows will be added to the list and the necessary files will be attached to the email message.
The completed list and attached files in an email

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.