# .macro file command

The .macro file command defines the
file name that contains the Output processor macro items. Macros may
contain multiple Output processor commands and text.

**Synonyms:** .mf

A macro is an item in a given file reference with an item-ID
of the format .macroid. The item-ID of the macro
must begin with a period.

Note: The macro file name cannot have
any periods.

Items from the macro file are included in the
Output processor documents by entering the item-ID of the macro in
the document. Any string preceded by a period that is not a standard
Output processor command is treated as a macro.

A macro can
reside in the file being edited, or another file. If a macro file
name has not been declared, the Output processor looks for the macro
in the current file. After the macro has been processed, control returns
to the original document item.

## Syntax

```
.macro file file.reference
```

## Example(s)

The item to process resides in
the templates file, with an item-ID of .fax.

```
u document letter
01 This letter is to inform you of the following information.
02 .macro file templates
03 .fax
04
05 Sincerely yours,
06
07 Your Name Here
```
The item to process resides in the dm account in the templates
file with an item-ID of .fax.

```
u document letter
01 This letter is to inform you of the following information.
02 .macro file dm,templates,
03 .fax
04
05 Sincerely yours,
06
07 Your Name Here
```
The item to process resides on the current account and
same file (document) with an item-ID of .fax.

```
u document letter
01 This letter is to inform you of the following information.
02
03 .fax
04
05 Sincerely yours,
06
07 Your Name Here
```

## See also

- [Output processor commands](https://d3codex.com/output-processor/output-processor-commands/)
- [Output processor overview](https://d3codex.com/output-processor/output-processor-overview/)

---
Source: https://d3codex.com/output-processor/dot-macro-file-command/ - part of the D3Codex reference.
