Update Hyperlink Address to TexttoDisplay value

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top