Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
Heloo All,
I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
What do you mean by Icons? are they shapes.
-- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Heloo All, I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
Tom,
I mean images. Images in a .gif format "Tom Ogilvy" wrote in message ... What do you mean by Icons? are they shapes. -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Heloo All, I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
Hi Fred,
You can extract the hyperlink like this: Sheets("Sheet1").Shapes(1).Hyperlink.Address If you want to delete the Shapes and replace them with text URLs, you could do something like this: Sub RemoveImagesWithHyperlinks() Dim shp As Shape Dim bHasLink As Boolean For Each shp In Sheets("Sheet1").Shapes On Error Resume Next bHasLink = Len(shp.Hyperlink.Address) On Error GoTo 0 If bHasLink Then shp.TopLeftCell.Value = "'" & shp.Hyperlink.Address shp.Delete End If bHasLink = False Next shp End Sub -- Regards, Jake Marx www.longhead.com Fred Taylor wrote: Tom, I mean images. Images in a .gif format "Tom Ogilvy" wrote in message ... What do you mean by Icons? are they shapes. -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Heloo All, I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
Sub Tester1()
Dim hLink As Hyperlink Dim rng As Range For Each hLink In ActiveSheet.Hyperlinks If TypeName(hLink.Parent) = "Shape" Then Set rng = hLink.Parent.TopLeftCell.Offset(0, 2) rng.Value = hLink.Address End If Next End Sub You could also delete the hyperlink in the loop as well (an the shape as well I assume) Sub Tester1() Dim hLink As Hyperlink Dim rng As Range For Each hLink In ActiveSheet.Hyperlinks If TypeName(hLink.Parent) = "Shape" Then Set rng = hLink.Parent.TopLeftCell.Offset(0, 2) rng.Value = hLink.Address hLink.Delete End If Next End Sub -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Tom, I mean images. Images in a .gif format "Tom Ogilvy" wrote in message ... What do you mean by Icons? are they shapes. -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Heloo All, I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting links from images
tx Tom. you're good.
"Tom Ogilvy" wrote in message ... Sub Tester1() Dim hLink As Hyperlink Dim rng As Range For Each hLink In ActiveSheet.Hyperlinks If TypeName(hLink.Parent) = "Shape" Then Set rng = hLink.Parent.TopLeftCell.Offset(0, 2) rng.Value = hLink.Address End If Next End Sub You could also delete the hyperlink in the loop as well (an the shape as well I assume) Sub Tester1() Dim hLink As Hyperlink Dim rng As Range For Each hLink In ActiveSheet.Hyperlinks If TypeName(hLink.Parent) = "Shape" Then Set rng = hLink.Parent.TopLeftCell.Offset(0, 2) rng.Value = hLink.Address hLink.Delete End If Next End Sub -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Tom, I mean images. Images in a .gif format "Tom Ogilvy" wrote in message ... What do you mean by Icons? are they shapes. -- Regards, Tom Ogilvy "Fred Taylor" wrote in message ... Heloo All, I have a page formatted this way: Column A Column B Column C Company Phone Web Site The column C has icons with links to the web sites address. How can I convert these links to text (such as www.example.com) instead of having the links attached to the icons? thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Images and Links | Excel Discussion (Misc queries) | |||
Extracting embbeded web address links | Excel Discussion (Misc queries) | |||
Chart.Export images are shrinking as I export more images | Charts and Charting in Excel | |||
Changing data links turns combo boxes into images | Excel Discussion (Misc queries) | |||
EXCEL - LINKS cannot easily get list of all links & names in book | Excel Worksheet Functions |