View Single Post
 
Old 12-04-2019, 07:29 AM
mtandino mtandino is offline Windows 10 Office 2016
Novice
 
Join Date: Dec 2019
Posts: 5
mtandino is on a distinguished road
Default Can you use VBA to insert unique identified picture files to certain areas in a Word doc?

I have a Word template and we use that template along with an Excel file to do a mail merge to insert specific data on specific people. So each person has 5 data rows. Let's say the following:

- Apples
- Bananas
- Oranges
- Grapes
- Kiwis

We run the mail merge to get the 5 pages on each person in one document, so if we have 10 people we are going to have a 50 page document. In addition to this, we have a picture file of a graph stored locally for each of those data points as well that needs to be inserted on the specified page of the data point. That picture needs to be inserted on a specific area on the pages though and needs to be a specific size. Right now, the picture insertion is all done manually and I am trying to figure out a way to speed up the process, if possible

I already assume that the picture files need to be named in such a way to match it with the person and the data point so it can be inserted on the correct page for the correct person, which we currently have setup so the picture file for one person might be named JohnDoeapples.jpg and so on. I have also found instances of of macors to insert pictures in Word documents online. The part where I am lost is how to insert based off the unique identification I previously named, the specific points where the picture needs to be inserted, and the sizing of the picture inserted. Is that possible? If you need more information, please let me know.
Reply With Quote