|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
If you're already using mailmerge, why not use that for the image insertion?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
You can do that with the requirements I laid out from a local directory?
|
#4
|
||||
|
||||
Yes, you can.
To restrict the size of the image, put it into a table cell of fixed width
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
||||
|
||||
See Managing Mailmerge Graphics in the Mailmerge Tips and Tricks Sticky thread at the top of the mailmerge forum: Mailmerge Tips & Tricks
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using IncludePicture and MailMerge to insert picture that is taken from a a picture lookup in Excel | nic-nax | Mail Merge | 4 | 05-14-2019 10:34 PM |
Picture content control -> insert picture -> empty? | Jaymond Flurrie | Word | 3 | 07-13-2016 07:00 AM |
How do I insert pictures directly into picture boxes by clicking the box instead of using INSERT>PIC | Bree | Word | 1 | 06-24-2016 10:32 PM |
Insert a picture into word using DDE (Dynamic Data Exchange) | sasdde | Word VBA | 5 | 06-21-2013 01:21 AM |
Insert picture background in Word mail merge labels | obasanla | Mail Merge | 6 | 11-26-2012 11:53 PM |