Using export macros

Macros, also known as export templates or placeholders, are special codes or variables used to automate the export process. These macros are replaced with specific values or data when you export files, emails, or other types of content. They can be utilized in command line parameters and UI forms, if the utility supports them. There are two types of macros: common macros, which can be used in all utilities supporting macros, and special macros, which are specific to certain utilities.

Macros syntax

Typically, macros are given uppercase names to stand out more clearly in your command line parameters. Here is the general syntax for using macros:

{MACRO:length#format?default value}

MACRO Macro name
length Specifies the character count to be taken from the beginning of the string
Example:
{SUBJECT:80} the first eighty characters of the message subject
format Advanced appearance settings for certain macros
default value Specifies the value to be used when parsing the macro produces an empty string
Example:
{SUBJECT:80?None} the first eighty characters of the message subject, or "None" if the message subject is not set

All parameters, except the macro name, are entirely optional. You can use macros repeatedly within the same text.

Common macros

The following macros are common and can be used in command line parameters and UI forms, if the utility supports it:

NOW Current date and time
Allows specifying format string.
If no format is specified, uses the full date and time format:
yyyy-MM-dd HH-mm-ss
Standard date and time format strings
Custom date and time format strings
TODAY Current date
Allows specifying format string.
If no format is specified, uses the short date format:
yyyy-MM-dd
AutoIncrement Autoincremental number per each destination folder

Special macros

Special macros depend on the type and application context of the utility.

DATE Message date
Allows specifying format string.
If no format is specified, uses the short date format:
yyyy-MM-dd
SUBJECT Message subject
Invalid path characters are replaced with underscores (_) in the message subject. As the subject may be very long, the beginning of the chapter describes how to avoid these problems.
FROM Message sender
Email address of the email message sender.
Optionally, you can use one of the following values as a format string:
DOMAIN – email address domain (part of the address after @),
NAME – display name of the email message sender.
Example:
{FROM#NAME}
EntryId Message EntryId
A unique ID field generated by the messaging storage system.
FOLDER Outlook Folder
The name of the Outlook item's folder currently being processed, or the folder itself.
FILE Data file
Full path to currently being processed data file.
Optionally, you can use one of the following values as a format string:
NAME – filename only (without directory and extension),
EXT – file extension only,
PATH – file directory only (without filename).
FILENAME Data file name
Filename with extension.
PATH Data file directory
Full directory path to currently being processed data file.

Updated on May 12, 2024

Facebook Email

See Also

Boolean Search Syntax

This guide explains boolean search operators, functions and wildcards (AND, OR, NOT, ALL, ATLEASTONE, NEITHER, NOTALL, ?, *)