Replace hyperlinks with actual pictures
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). |
Replace hyperlinks with actual pictures
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 "mi" wrote in message oups.com... 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). |
Replace hyperlinks with actual pictures
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. |
All times are GMT +1. The time now is 01:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com