Solved

batch insert graphics into excel using VBA

Posted on 2013-11-12
3
458 Views
Last Modified: 2013-11-12
Dear Experts:

I wonder whether the following is feasible using VBA

I got a product list with the following make-up

item-no    description       path                                               graphic
17-15        myproduct1        C:\test\myproduct1.tif                   graphic to be inserted
17-17        myproduct2        D:\myfolder\myproduct2.tif          graphic to be inserted
17-19        myproduct3        C:\test2\myproduct3.tif                 graphic to be inserted
etc.

The graphics are not located in just one folder but are scattered in many different folders.

I wonder somebody is able to come up with a VBA solution.

I know that this should be done using excel as a data source and doing a mailmerge using word. This works just great. I have worked with that approach dozens of times, but this time the requirement is to do this directly in Excel.

Thank you very much in advance.

Regards, Andreas
0
Comment
Question by:AndreasHermle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39641297
Hi,
pls try
Sub Macro1()
'
For Each c In Range(Range("C2"), Range("C" & Rows.Count).End(xlUp))
    c.Offset(0, 1).Activate
    ActiveSheet.Pictures.Insert ( _
        c.Value2)
Next
End Sub

Open in new window

Regards
0
 

Author Comment

by:AndreasHermle
ID: 39641539
Hi Rgonzo,

The last 4, 5 questions have all been answered by. Great. Works just fine.

Thank you very much for your great and professional support.

Regards, Andreas
0
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 39641552
Since I suppose you live in Germany due to your name, living on the same time zone is an advantage for a timely response.

Regards
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question