Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

batch insert graphics into excel using VBA

Posted on 2013-11-12
3
Medium Priority
?
460 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

722 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