Home > Archive > MS Access data conversion > June 2005 > Hyperlinks from Excel









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Hyperlinks from Excel
Bernd

2005-06-12, 11:24 am

Dear all

I'm using Office 2003.

While importing (or pasting) data from an Excel-sheet with links,
link-addresses get lost.

Any idea how to save them?

Regards

Bernd


John Nurick

2005-06-12, 8:24 pm

Hi Bernd,

Access hyperlink fields are just memo fields that store the hyperlink
information as text with the display text, web address and bookmark
delimited by #. The function below can be used to convert the Excel
hyperlinks into this format on the Excel sheet before importing.

Public Function ExpandHyperlink(R As Range, _
Optional AddressOnly As Boolean = False) As Variant

'Converts Excel hyperlink into a string that can be
'imported into an Access text field which can then
'be converted into a hyperlink field.

If R.Hyperlinks.Count > 0 Then
With R.Hyperlinks(1)
ExpandHyperlink = IIf(AddressOnly, .Address, _
.Name & "#" & .Address & "#" & .SubAddress)
End With
Else
ExpandHyperlink = ""
End If
End Function

On Sun, 12 Jun 2005 18:05:06 +0200, "Bernd" <bjurk@hotmail.de> wrote:

>Dear all
>
>I'm using Office 2003.
>
>While importing (or pasting) data from an Excel-sheet with links,
>link-addresses get lost.
>
>Any idea how to save them?
>
>Regards
>
>Bernd
>


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com