View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] YehWei@gmail.com is offline
external usenet poster
 
Posts: 15
Default Inserting Hyperlinks to each image in a directory

Hi,

I would like to add hyperlinks to my digital collection which will
always be stored in \Digital Camera\.

The subsequent directories may change. So the problem now is how do I
do it programmatically to sequentially search through all the
directories and each each image under the directory as a hyperlink in a
worksheet? A sample of the code for manual addition is shown below.

Any help is appreciated. Thanks!

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"D:\1 Data\Personal\Digital
Camera\Australia\100_1027\IMGP0471.JPG", _
TextToDisplay:= _
"D:\1 Data\Personal\Digital
Camera\Australia\100_1027\IMGP0471.JPG"
Range("A2").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"D:\1 Data\Personal\Digital
Camera\Australia\101_1028\IMGP0475.JPG", _
TextToDisplay:= _
"D:\1 Data\Personal\Digital
Camera\Australia\101_1028\IMGP0475.JPG"