Microsoft Office Forums Can you use VBA to insert unique identified picture files to certain areas in a Word doc?

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2019, 07:29 AM
mtandino mtandino is offline Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Windows 10 Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Office 2016
Novice
Can you use VBA to insert unique identified picture files to certain areas in a Word doc?
 
Join Date: Dec 2019
Posts: 2
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
  #2  
Old 12-04-2019, 02:33 PM
macropod's Avatar
macropod macropod is offline Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Windows 7 64bit Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,642
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

If you're already using mailmerge, why not use that for the image insertion?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 12-04-2019, 06:59 PM
mtandino mtandino is offline Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Windows 10 Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Office 2016
Novice
Can you use VBA to insert unique identified picture files to certain areas in a Word doc?
 
Join Date: Dec 2019
Posts: 2
mtandino is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
If you're already using mailmerge, why not use that for the image insertion?
You can do that with the requirements I laid out from a local directory?
Reply With Quote
  #4  
Old 12-04-2019, 09:10 PM
Guessed's Avatar
Guessed Guessed is offline Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Windows 10 Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 1,374
Guessed is a jewel in the roughGuessed is a jewel in the roughGuessed is a jewel in the roughGuessed is a jewel in the rough
Default

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
Reply With Quote
  #5  
Old 12-04-2019, 11:35 PM
macropod's Avatar
macropod macropod is offline Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Windows 7 64bit Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,642
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

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
[MS MVP - Word]
Reply With Quote
Reply

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
Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Picture content control -> insert picture -> empty? Jaymond Flurrie Word 3 07-13-2016 07:00 AM
Can you use VBA to insert unique identified picture files to certain areas in a Word doc? 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
Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Insert a picture into word using DDE (Dynamic Data Exchange) sasdde Word VBA 5 06-21-2013 01:21 AM
Can you use VBA to insert unique identified picture files to certain areas in a Word doc? Insert picture background in Word mail merge labels obasanla Mail Merge 6 11-26-2012 11:53 PM


All times are GMT -7. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft