Thanks for the quick reply. Would the code be entered in the cell? If so, what are the steps to make the image to appear?
Main Topics
Browse All TopicsWe have a report which is converted to Excel. One of the fields includes a path to a .jpg image e.g. \\servername\folder\car.jp
Is there a way for Excel to make this image appear - or have pulled into the cell using either Excel 2003 or 2007?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
No, qwert5905. That code would be put into a macro instead.
The easiest way to get this in would be to go to Tools -> Macro -> Record Macro and give the macro a name and assign a keystroke to it (e.g., Ctrl-Shift-J or something). Once Excel is "recording" what you do, go to Insert -> Image -> From File, browse to a graphic file, and let it load. Then stop the macro recording.
Next, use Alt-F11 to go to the macro editor. Your new macro will be in Module 1 (in the tree on the left), and you can look at the code there. It will have some comments in it indicating the date you recorded it, and it will have a line that looks a lot like the one above (though it may be broken across multiple lines). You can edit that code directly to point it to a particular file, if the file doesn't change.
To run the macro, simply select the cell where you want the image to appear and press the keystroke you specified when you recorded the macro. Or, press Alt-F8 to get a list of available macros and run the macro from the list. (Both of these options assume you have your macro security settings to Medium or Low, to allow you to run macros.) There are other things you can do to automate this (document open, worksheet select, etc.). But you run the risk of overautomating this, having it load images every time you open the document, whether it should or not, or having it try to load images from network resources that may not be available at the time the trigger fires.
If you want to be able to specify the filename and path in a cell in the spreadsheet, that can be done, too. It's a fairly simple matter to get the text of a cell into the macro language and substitute it in, if that's what you want to be able to do.
Business Accounts
Answer for Membership
by: BarryTicePosted on 2009-11-05 at 14:32:18ID: 25754827
You can insert a photo using this code. Obviously, you could dynamically determine the path and image name.
Hope this helps.
Select allOpen in new window