---
schema_version: "1"
id: 8c05295673cf2d875041f09f84ef5e8363310a2c857b47e609f189d62c3529e1
title: MailmergeTemplate
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_mailmergetemplate.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_mailmergetemplate.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 89c8910960c9d1085beb32f4d3fb1fb25dc78b36fc848c3f04f1e2833816abd9
description: Represents a mail merge template (a Microsoft Word document) used for performing mail merges for your organization.
---
# MailmergeTemplate

Represents a mail merge template (a Microsoft Word document) used for performing mail merges for your organization.

## Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

## Special Access Rules

- All users can view this object, but you need the “Customize Application” permission to modify it.
- Customer Portal users can’t access this object.

## Fields

| Field | Details |
| --- | --- |
| Body | 
Type

base64

Properties

Create

Description

Required. Microsoft Word document to use as a mail merge template. Due to limitations with Microsoft Word mail merge templates, your client application can specify the Body field when creating these records, but not when updating them. Limit: 5 MB.



 |
| BodyLength | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Length of the Microsoft Word document.



 |
| Category | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The type of document template. Possible values are:

- Document
- Envelope
- Label

The default value is Document.



 |
| Description | 

Type

string

Properties

Create, Filter,Group, Nillable, Sort, Update

Description

Required. Text description of this mail merge template. Limit: 255 characters.



 |
| Filename | 

Type

string

Properties

Create, Filter, Group, Sort

Description

Required. File name of the Microsoft Word document that was uploaded as a mail merge template. Limit: 255 characters in length.



 |
| IsDeleted | 

Type

boolean

Properties

Defaulted on create, Filter

Description

Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is **Deleted**.



 |
| LastUsedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Date and time when this MailmergeTemplate was last used.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

Required. Name of this mail merge template.



 |
| SecurityOptionsAttachmentHasFlash | 

Type

boolean

Properties

Create, Filter, Update

Description

Required. True if Flash Injection was detected in the attachment.



 |
| SecurityOptionsAttachmentHasXSSThreat | 

Type

boolean

Properties

Create, Filter, Update

Description

Required. True if a cross site scripting threat was detected in the attachment.



 |
| SecurityOptionsAttachmentScannedforFlash | 

Type

boolean

Properties

Create, Filter, Update

Description

Required. True if the attachment has been scanned for Flash Injection.



 |
| SecurityOptionsAttachmentScannedForXSS | 

Type

boolean

Properties

Create, Filter, Update

Description

Required. True if the attachment has been scanned for a cross site scripting threat.



 |

## Usage

Use this object to manage mail merge templates for your organization.

#### See Also

- [Overview of Salesforce Objects and Fields](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm "Salesforce objects and fields are analogous to database tables and the table columns. Objects and fields structure data. For example, the central object in the Salesforce data model represents accounts—companies and organizations involved with your business, such as customers, partners, and competitors.")