View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Inserting a photo from a directory

Sub TestInsertPicture()
[B2].Select
ActiveSheet.Pictures.Insert ( "c:\photo.jpg")
End Sub

JB

On 16 jan, 22:58, Stevep4 wrote:
I guess that your code is in French language which needs translating into
Excel 2000 english.

Firstly, lets try to simplify things. Lets start with inserting a photo from
my local hard drive. *Would this code work??

Sub TestInsertPicture()
insertPicture "C:\photo.jpg",
Range (a2)
End Sub



"JB" wrote:
Sub ImportPicture()
* repertoire = "G:\shared\data\"
* [M22].Select
* ActiveSheet.Pictures.Delete
* Set monimage = ActiveSheet.Pictures.Insert(repertoire & [L22] &
".jpg")
* Selection.RowHeight = monimage.Height
End Sub


JB
http://boisgontierjacques.free.fr


On 16 jan, 12:58, Stevep4 wrote:
What would I need to do to get a picture to automatically insert into a cell?


In a separate cell, the filename will appear (such as HP97).


I want something like


=INDIRECT.EXT("'G:\shared\data\["&L22&".jpg]")


where cell L22 would provide the detail such as HP97


The remote directory will have hundreds of jpg files, so I cannot consider
the McGimpsey solution which requires the photos to be hidden in the excel
document.


Following the insert of the picture. I would prefer that the picture is
scaled to fit, but if this is not possible, I can scale the original pictures
myself before saving them into the directory. *- Masquer le texte des messages précédents -


- Afficher le texte des messages précédents -