Print this page

How to add custom images in a Mail Merge Document?

Knowledge Article Number 000229801
Description It is possible to insert images into a mail merge document if you have a formula text field that directly links or references an image file in the Documents object/tab.
Resolution To get the link of the file directly from the Documents object.
 
1. Click All Tabs
2. Click Documents
3. Click or choose on a Document that has an image
4. Right click on the picture/image and click "Copy image URL"
5. Open Notepad and paste it

 
Note: Below is an example of the image URL.

https://c.na17.content.force.com/servlet/servlet.ImageServer?id=015o0000001i95T&oid=00Do0000000a1kb&lastMod=1442538789000

Remove "&lastMod=1442538789000" from the last line of the URL.

To create the field that will reference this image

 
1. For Custom Objects: Go to Setup > Create > Objects
    For Standard Objects: Go to Setup > Customize > [Object Name] > Fields
2. Click the New button on Custom Fields & Relationships
3. Choose Formula under Data Type then click Next
4. Type in the Field Label and Name then choose Text under Formula Return Type and click Next
5. Paste the URL from Notepad and add quotation marks (") at the beginning and the end

Note: Below is an example URL on how it should look like.
"https://c.na17.content.force.com/servlet/servlet.ImageServer?id=015o0000001i94V&oid=00Do0000000a1kb"

 
6. Click Next
7. Put a check on Visible then click Next
8. Click Save. (You can uncheck Add Field if you don't want to view this field in the Page Layout.)

To insert the image in Microsoft Word
 
1. Open Microsoft Word
2. Click Insert
3. Click Quick Parts
4. Click Field
5. Choose "MergeField" on Field Names
6. On Field Properties, put in IMAGE:OBJECT_FIELDNAME
(Note: Replace OBJECT_FIELDNAME with the formula text field.)
7. Press OK

Considerations/Limitations: Please note that this will not work if you have a custom formula field that has the "IMAGE" formula function inserted.

For more details:

Mail Merge Overview




promote demote