Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
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
Images and Links justlearnin Excel Discussion (Misc queries) 0 November 6th 08 07:36 PM
Extracting embbeded web address links Suzie Excel Discussion (Misc queries) 1 March 5th 08 02:32 PM
Chart.Export images are shrinking as I export more images Jared Charts and Charting in Excel 3 January 29th 08 03:23 AM
Changing data links turns combo boxes into images Bill Excel Discussion (Misc queries) 0 October 25th 06 07:39 PM
EXCEL - LINKS cannot easily get list of all links & names in book Tuba Joe Excel Worksheet Functions 1 September 29th 05 10:33 PM


All times are GMT +1. The time now is 03:14 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"