A certain department in the school was planning to manually create 400 or so documents, which include the students name and picture. They were planning to do this manually, typing the students names and finding the pictures from the picture repository. Two issues there, one, the names are all in our SIS database, so can readily be exported to Excel. Two, the pictures are all named by the students ID number.
I have never before managed to get pictures working within a Word mail merge, but with the help of the internet and Word 2013, I did. However it is really finicky. This was worsened by the fact that the picture needed to be placed in to a text box, so that it aligned correctly with the template provided.
I’ll not cover the basics of mail merging, just the specifics for the picture merge.
Datasource:
In the data source (Excel) create a column called ‘picture-location’. In the field you should have the link to the local pictures (I tried it from a network location, it doesn’t seem to work.) The link must have double slashes, like this: D:\\Photos\\sample.jpg.
Ideally all the pictures should be exactly the same size and file extension. Also there should be a picture for each record in your excel sheet, otherwise you will, obviously, not get a picture for that record.
Start the mail merge and then you have to manually add the picture merge field:
Press Alt+F9 this will input two curly brackets {}, you cannot type these brackets from the keyboard. Then type:
{INCLUDEPICTURE "{MERGEFILD picture-location}" \d}
That’s it. Here is the finicky part, you have to click F9 to refresh the page, to show the pictures. However F9, cannot refresh text box content!
So you can either click on to each text box, one by one and hit F9 or use a macro. It’s been a long time since I used a macro. I found this macro here.
Here is the macro:
Sub REFRESH()
Dim shp As Shape
For Each shp In ActiveDocument.Shapes
With shp.TextFrame
If .HasText Then
.TextRange.Fields.Update
End If
End With
Next
End Sub
After running this macro all the pictures update.
One caveat, the completed merge document, doesn’t embed the pictures in to the document. So you will need the picture repository to always be local on your computer. That means you cannot email the merge document to someone else, unless they copy the picture repository to their local machine at exactly the same path.

