View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JW[_6_] JW[_6_] is offline
external usenet poster
 
Posts: 2
Default Using VB.Net, How Do I Put a Picture (jpg) Into a Cell ?


"eBob.com" wrote in message
...
I am creating an Excel 2002 sheet programmatically using VB.Net. It all
works fine. But now I'd like to add a photograph to each row. I've done
searches but all the hits I get must be for VBA rather than VB.Net. In
any
event the hits have not helped. I'm aware of
HOWTO: Automate Microsoft Excel from Visual Basic .NET
http://support.microsoft.com/default...b;en-us;301982


but that doesn't illustrate how to put a photograph (jpg or similar) into
a
cell.

Any pointers will sure be appreciated.

Thanks, Bob


For anything you don't know how to do programmatically in Excel a good
starting point is the Macro recorder. Start the Macro recorder, choose/move
input cell, click menus etc, stop the recorder and see what code it
produces.

For the VB .Net Excel automation program in your link, the following inserts
a pictu

oSheet.Range("K2").Select()
oSheet.Pictures.Insert( "C:\temp\myPicture.JPG")