Using photos in mail merging from an excel doc

bobbieexcel

New Member
Joined
Apr 17, 2002
Messages
35
I am working with form letters in Word, from a mail merge to an excel spreadsheet. I am having trouble inserting photos. I am trying to put the photo file into the spreadsheet so I can use that column as a merge field, but it is not working. What do I need to do to insert the photo?

Thanks,
Bobbie
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi Bobbie,

I do not believe that mailmerge supports objects such as photos. If this is the case, one solution would be to have mailmerge merge a keyword text field such as

<Photo:Picture 1>

into each Word document, where "Picture 1" is the name of the picture object in Excel that you want merged into the particular Word document.

Then you could write a VBA macro that performs a second pass on all the merged Word documents, replacing the keyword text with the corresponding picture from Excel.

Damon
 
Upvote 0
Oops, I think I accidentally used BBCode, which didn't appear in my posting. What I meant was this:


I do not believe that mailmerge supports objects such as photos. If this is the case, one solution would be to have mailmerge merge a keyword text field such as

<Photo:Picture 1>

into each Word document, where "Picture 1" is the name of the picture object in Excel that you want merged into the particular Word document.

Then you could write a VBA macro that performs a second pass on all the merged Word documents, replacing the keyword text with the corresponding picture from Excel.

Damon
 
Upvote 0
Thank you, and i will try that. I do not know much about VBA codes or macros, but it does make sense. I have inserted the photo file into the colum where I want the photo located, so if you click it on the spreadsheet, it opens the photo. So, what you are saying is that I can insert a macro that tells it to click it open, and then it will apear on my merge?
 
Upvote 0
Hi again Bobbie,

I had assumed that you had the pictures pasted into Excel. If I now understand correctly, what you have in Excel are hyperlinks to various pictures? If so, the mail merge is probably just pasting the text string corresponding to the picture file path into Word. Is this correct?

Either way, you still will probably need a macro to loop through all the merged files and convert the picture file path text strings to true hyperlinks so that they will open when clicked on. Or, if you want the actual pictures pasted into the Word documents the macro would have to go get the file corresponding the the text string path and paste it in. This macro would need to be run as an additional step after the mail merge is completed.

Damon
 
Upvote 0
I did have the photo copied into my spreadsheet, but the photo just sits there, the cell does not contain the file. So when I merge, the merge picks up the cell value as empty. So I was trying to make the cell contain the photo, so I did an insert file. When I insert an object, an image doc, or hyperlink, the photo or icon also sits in the cell, but the cell does not contain the information to be picked up on the merge. That is my problem.

Thanks,
Bobbie
 
Upvote 0
Hi Bobbie,

Yes, as you have discovered, pictures can't be put "in" cells. When a picture is pasted onto a worksheet it resides in a layer on top of the worksheet and is not associated with a particular cell. If you want to merge the picture into your Word document I think you will have to use my suggestion about following your merge operation with running a macro that inserts the pictures, using something like I suggested (keyword containing name of picture) to determine where in the Word document to paste each picture.

Damon
 
Upvote 0

Forum statistics

Threads
1,215,456
Messages
6,124,939
Members
449,197
Latest member
k_bs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top