Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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   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 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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   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 -


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a picture object and double-clicking on it opens photo e Kay Excel Discussion (Misc queries) 4 August 12th 08 03:09 AM
HOw do I set up a photo database? aggietwins03 Excel Discussion (Misc queries) 0 February 12th 07 07:03 AM
updating photo Joe William Links and Linking in Excel 2 July 30th 05 01:37 AM
Link to a photo. grupy dyskusyjne Links and Linking in Excel 7 June 2nd 05 08:18 PM
photo gallery prmanoel Excel Discussion (Misc queries) 2 March 11th 05 11:00 PM


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"