Rename a hyperlink

JQasd

Registered User.
Local time
Today, 05:36
Joined
Jun 21, 2016
Messages
35
Hi there ,
Can anyone guide me how to rename hyperlinks in access. I have path links of excel files in my access database report . I want to rename them so they are more readable.I have links in table which is then converted to a report for the user to see and click on links.

I know it can be done easily with outlook however, couldn't find how to do it with access.

Many thanks
 
If you just want to manually edit them in the table right click on the hyperlink field, select HyperLink and then Edit Hyperlink.

You can do the same in the report in report view.
 
Last edited:
If you just want to manually edit them in the table right click on the hyperlink field, select HyperLink and then Edit Hyperlink.

You can do the same in the report in report view.

I don't want to simply edit it but give a different name rather than the long path file link.
Just like a long link is changed into a small hyperlink text in outlook.

Please assist
 
there are two portions in Hyperlink, which is enclosed in hashtag #.


ARNEL#C:\FOLDER\X.PDF#

the first part ARNEL is the description.
C:FOLDER\X.PDF is the actual location of the file.

so if you can use Split() function you can replace the first part with more descriptive text:
so to replace the description with your own:

dim lngPos as long
lngpos = instr([hyperlinkfield], "#")
if lngpos = 1 'at first position meaning description and path same
[hyperlinkfield] = strDescription & [hyperlinkfield]
else
[hyperlinkfield]=strDescription & mid([hyperlinkfield, lnpos)
end if
 
there are two portions in Hyperlink, which is enclosed in hashtag #.


ARNEL#C:\FOLDER\X.PDF#

the first part ARNEL is the description.
C:FOLDER\X.PDF is the actual location of the file.

so if you can use Split() function you can replace the first part with more descriptive text:
so to replace the description with your own:

dim lngPos as long
lngpos = instr([hyperlinkfield], "#")
if lngpos = 1 'at first position meaning description and path same
[hyperlinkfield] = strDescription & [hyperlinkfield]
else
[hyperlinkfield]=strDescription & mid([hyperlinkfield, lnpos)
end if


Thanks a lot for your reply. Can you tell me where should I put the coding. because the hyperlinks are just in a table column. The report which the user will view generated by that table will have these hyperlinks.
 
Thanks . It works alright for me.

Thanks alot
 
I don't want to simply edit it but give a different name rather than the long path file link.
Just like a long link is changed into a small hyperlink text in outlook.

Please assist

If you right click on the hyperlink field, select HyperLink and then Edit Hyperlink. you get the following dialog.

attachment.php


To add the name just erase what ever is in the Text to display box at the top and add what you want. I don't see the point of the code unless you are updating the name to the value of some other field.
 

Attachments

  • Edit Hyperlink.jpg
    Edit Hyperlink.jpg
    61.1 KB · Views: 730

Users who are viewing this thread

Back
Top Bottom