Solved

batch insert graphics into excel using VBA

Posted on 2013-11-12
3
456 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 51

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 51

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

752 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