Update Hyperlink Address to TexttoDisplay value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have inherited an old table of data where hyperlinks that were entered have
somehow had the string value for the address removed or changed so that the
hyperlinks are not working. However, the values of the texttodisplay/Display
Text is correct. Is there a piece of code or a query that I could use to
update the address text to match the display text of the hyperlink?

Any help would be greatly appreciated!

Have been trying for ages to solve it with some VB code by looping through
the recordset of all records with hyperlinks but when I try to retrieve the
hyperlink field's value from the recordset i.e. recordset("Hyperlink"), a
string is returned rather than a Hyperlink object which means I can't
maniuplate the various properties of the hyperlink object in VB
 
Andrew,

1. Make a backup of your original table.
2. Set up a new table with the record key and a text(255) field.
3. Create an Append query to add the record key and the hyperlink from the
source table to the new table.

This will convert the hyperlinks into text, which you can edit using queries
or a scan. The finished format should be:

(e-mail address removed)#mailto:[email protected]#
www.google.com#http://www.google.com#
c:\myfile.txt#file:c:\myfile.txt#

When you get them this way, create a new query that updates the original
hyperlink field with the text data as reformatted.

Bruce
 
Back
Top