function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Mail Merge in salesforce

Hi friends


I know the functionality of mail merge in word but  i don't know  How  the mail merge  works in sales force? I found  the application in app exchange in sales force named as Draw loop. any one can describe  how the mail merge in sales force.

any app exchange tool will be used or not?


Thanks Friends post ur valuable suggestions and comments it will helps for  all.





For mail merge you need not use any specific tool.


To generate a single Microsoft Word mail merge document:


  1. Click Mail Merge in the Activity History related list on the appropriate record. Accounts, contacts, leads, cases, opportunities, and custom objects are supported.
  2. Use the lookup to specify the record from which information will be merged.
  3. If your organization uses person accounts, person accounts are returned in both account and contact lookup searches.
  4. Select a mail merge template.
  5. Optionally, select the checkbox to log a task for the mail merge.
  6. Click Generate.  If the custom object has a master-detail relationship with opportunities, the primary contact for the opportunity is selected by default.
  7. then generates your document:
  •  If your organization uses standard mail merge, Word opens with your generated document. When the document displays, choose Save As from 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, sends you an email that either includes your generated Word document as an attachment or provides a link to it on the Documents tab.

You can also have a look in to the documention available on


Thanks for the information, but....


Who creates the Word templates?  I have been trying to get someone to help me internally find the validation codes for merge fields but that is not successful.  Where can I find the validation codes to create my own mail merge templates?  Ive read the instructions and they are not intuitive for us non-technical folks.


I want a drop down menu like the one offered in my HTML email templates set up where I pick the direction and it gives me the validation code.  For example, in the Email Template I say I want to know the code for the Lead Address and it gives me the code.  Does something like this exist for Mail Merge Templates?


Thank you!!




I was having the same problem, fortunately I found the link below and it was really helpful. However, I still don't know how to integrate customized fields... I achieved to integrate only the standard ones. Does anybody know how to do it?


Well, hope it helps!

Hi Pradeep ,


Thanks for the information. It helped me a lot.

My requirement is to customise the "generate" button which is present on Mail Merge Standard page. I want to redirect the user to a custom visualforce page. Is it possible?


Your help will be highly appreciated.