| 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.
|