You can merge a document template for a single object (e.g., Account, Contact, Lead, etc.) or you can perform a mass mail merge using records from a view. Accounts, contacts, leads, cases, opportunities, and custom objects are supported. If the custom object has a master-detail relationship with opportunities, the primary contact for the opportunity is selected by default.
****Salesforce Lightning Does Not Support Mail Merge by default. You will need to develop a button to connect to the Salesforce Classic functionality and add it or Switch to Salesforce Classic.
NOTE: Before users create mail merge documents using Extended Mail Merge, admins must set up the feature. First, from Setup, in the Quick Find box, enter User Interface, and then select User Interface. Under the Advanced section, select Enable Extended Mail Merge.
Single Mail Merge:
- **Switch to Salesforce Classic if needed.
- From the record you are on, click Mail Mergein the Activity History related list.
- Use the lookup to specify the record from which information will be merged.
- Select a mail merge template.
- Click Generate.
- Salesforce then generates your document:
- If your organization uses standard mail merge, Word opens with your generated document. When the document displays, choose Save Asfrom the File menu to save the document to your hard drive.
- If your organization uses Extended Mail Merge and your request exceeds the maximum size limit, you are prompted to select a smaller mail merge template. With Extended Mail Merge, Word does not open when you click Generate. Instead, Salesforce sends you an email that either includes your generated Word document as an attachment or provides a link to it on the Documents tab.
- If you chose to log an activity for the mail merge, enter the task information, and optionally create a follow-up task.
- The Subjectof the mail merge task is set to the mail merge template name by default, and the task is displayed as a completed activity in the Activity History related list. The merged document is not stored with the task.
- You can log an activity for mail merge if you have access to view or edit the record you are merging and are able to create tasks (that is, you have the “Edit Task” permission).
- Print and mail your document or send it as an email attachment.
To generate mass mail merge documents using the Extended Mail Merge feature:
- Click the accounts, contacts, or leads tab. Other kinds of records are not currently supported.
- In the Tools area, click Mass Mail Merge to start the mass mail merge wizard.
- Choose an appropriate list view from the View list.
- Select the records to include in the mail merge. To select all records currently displayed on the page, select the checkbox in the column header.
- Click Next.
- Select the types of Word documents you’d like to generate. The supported document types are documents, envelopes, and labels.
- Select the Log an activity… checkbox to log the generation of these mail merge documents by adding a completed task on each record.
- Click Next.
- Select the appropriate mail merge templates. For documents, choose whether to create one Word document that includes all output or a separate Word document for each record.
- Optionally, click Preview Template to review the Word document with merge fields but without your data. Note that although you can edit the Word document that opens, those changes won’t be applied to your current mail merge request. To make a newly revised template available for mail merge, it must be uploaded first.
- Click Finish.
- If your request exceeds the maximum size limit for Extended Mail Merge, you’re prompted to select either fewer records or smaller templates.
- Salesforce sends you an email when your generated documents are ready.