Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / May 2006

Tip: Looking for answers? Try searching our database.

Replace hyperlinks with actual pictures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mi - 30 May 2006 12:57 GMT
Hi,

I have a worksheet with a column of hyperlinks to pictures
(http://server/image.jpg, http://server/image2.jpg, etc.)

I would like to create a macro which replaces all the hyperlinks with
the actual pictures, or inserts them into an adjacent cell.

I can easily loop through the hyperlinks with

 For Each h In Worksheets(1).Hyperlinks

but I have not found a way to replace these links with the images they
are linking to.

I haven't found how to get the cell address of my hyperlinks either.
h.Address returns the web address, not "RxCy" as expected.

(and if possible, I would like to grow the cell's size to accomodate
for the size of the picture once it is downloaded).
David McRitchie - 30 May 2006 15:40 GMT
I tend to think that you already have it the best way for most
purposes, since you will only have the original picture once on
your computer and not a who lot of copies in Excel workbooks.

You could use what you have to generate your own HTML file
if you know HMTL.   There are many album applications that
create HTML files.

My  XL2HTML is ignorant of HTML tags so you can mix tags
in cells with data, and generate HTML.   Since you have hyperlinks
you can use them to generate the coding see my buildtoc.htm
page where you will find such functions as  hyperlinkaddress
to extract the hyperlink address.

Anyway in Excel there are several possibilities,  see
  Add a picture to a comment
  http://www.contextures.com/xlcomments02.html#Picture

 Display picture based on cell value
 http://www.mcgimpsey.com/excel/lookuppics.html

 Merge Pictures and Words (#photos)  these are links
 http://www.mvps.org/dmcritchie/excel/mailmerg.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]
My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm

> Hi,
>
[quoted text clipped - 16 lines]
> (and if possible, I would like to grow the cell's size to accomodate
> for the size of the picture once it is downloaded).
David McRitchie - 30 May 2006 19:50 GMT
actually as far as generating HTML goes,  if you are just
going to copy and paste,  you might as well just use worksheet
formulas alone.   Just depends on what is easiest for you, but
you would have to know HTML.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.