Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting a photo from a directory
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting a photo from a directory
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. * |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting a photo from a directory
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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting a picture object and double-clicking on it opens photo e | Excel Discussion (Misc queries) | |||
HOw do I set up a photo database? | Excel Discussion (Misc queries) | |||
updating photo | Links and Linking in Excel | |||
Link to a photo. | Links and Linking in Excel | |||
photo gallery | Excel Discussion (Misc queries) |