View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default How do you "strip" a hyperlink

I"m not sure I understand the problem completely. But this code should run
under '97 to convert entries in cells to hyperlinks - I use code very similar
to this in several 2000, XP and 2003 workbooks:
Assuming your document path/names are in column D and that is all that's in
D -

Sub MakeHyperlinks()
Dim lastRow As Long

lastRow = Range("D65536").End(xlUp).Row
Range("D1").Select
Application.ScreenUpdating = False
Do Until ActiveCell.Row lastRow
If Not(IsEmpty(ActiveCell)) Then
ActiveSheet.Hyperlinks.Add Anchor:=Selection,
Address:=ActiveCell.Value
End IF
ActiveCell.Offset(1, 0).Activate
Loop
Application.ScreenUpdating = True

End Sub


"Phil" wrote:

Hello,

I have just ran a program called List Files (by Primitive Software, rel
1.43) which created a list of all my docs from a folder. My goal is to
import the newly created table into a database which will utilize the
hyperlinks. The problem is that the database is Access 97, which means I
must save the file in Excel 97 format (I am currently using Excel 2003), but
if I save the table in 97, the hyperlinks will disappear.

This is the formula behind the Excel for the given document path:

=HYPERLINK("C:\Data\DOC\Prospect_Name\Hope\Carol Ann Colon et vir Allen
Colon DDrep 6-12-06.doc","Carol Ann Colon et vir Allen Colon DDrep
6-12-06.doc")

My intended result would be this format:
C:\Data\DOC\Prospect_Name\Hope\Carol Ann Colon et vir Allen Colon DDrep
6-12-06.doc

Any input would be greatly appreciated.

Phil