Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Relative link to folders and files on disk

0 views
Skip to first unread message

Brian Wilder

unread,
Nov 20, 2003, 3:04:13 PM11/20/03
to
It may be dumb of me, but I do not see how to create a "relative" link to a
file on disk. I see how to create an absolute link, say,
C:\foldertree\folder\filename.doc
but, somehow, I don't see how to make that link relative,
or to use a variable for C:\, if that's an alternative.

I want to include as data, hyperlinks to files in a certain folder tree on
disk. Which disk that folder tree will be on, may vary from PC to PC, so I
would like the link to be relative, so that I can put the folder tree on D:
on some PCs and C: on others, or maybe some arbitrary network drive.

Thank you for any advice, insight or pointer to resources.


Dirk Goldgar

unread,
Nov 20, 2003, 10:14:36 PM11/20/03
to
"Brian Wilder" <Brian...@aol.com> wrote in message
news:ulVs5F6r...@TK2MSFTNGP11.phx.gbl

One option is to set the database's HyperlinkBase property. The help
file topic "Set a hyperlink base for an Access file" tells how to do it
manually in the Database Properties dialog, but you can probably do it
with code at run time (I think I tried this once, but I can't remember
how it came out). My guess is that you have to create the propery if it
hasn't been previously set. This would be one of the properties in
CurrentDb.Containers("Databases").Documents("SummaryInfo").Properties.

Another option would be not to use hyperlink fields (which I find
cumbersome anyway), but to use text fields instead. Then when you want
to follow one of these pseudo-hyperlinks, you assemble the complete path
from the data and use Application.FollowHyperlink to follow it. This
would be my choice.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


0 new messages