How can I extract the address from and implrted hyperlink

S

Sandy Shin

I am importung an Excel spreadsheet with a hyperlink and want to use the
address, not the whole hyperlink. I can copy the cells as an htm document and
then view the source to isolate the addresses, but would prefer some code
which extracts the address as part of (or subsequent to) the importation step.
 
A

Allen Browne

Assuming that Access recognises the field as a hyperlink, you could create a
query, and type an expression like this into the Field row in query design:
HyperlinkPart([MyField], 2)

Use your field name in place of MyField.
 
S

Sandy Shin

Thanks. I did not know of the HyoerLinkPart() function - please note that
HyperlinkPart([myField],2) did not work, but HyperlinkPart[myField]),
acAddress) did

Allen Browne said:
Assuming that Access recognises the field as a hyperlink, you could create a
query, and type an expression like this into the Field row in query design:
HyperlinkPart([MyField], 2)

Use your field name in place of MyField.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Sandy Shin said:
I am importung an Excel spreadsheet with a hyperlink and want to use the
address, not the whole hyperlink. I can copy the cells as an htm document
and
then view the source to isolate the addresses, but would prefer some code
which extracts the address as part of (or subsequent to) the importation
step.
 
Top