Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Hyperlink Default Path

Hyperlink Default Path

Hyperlink Default Path

Does anybody know if it is possible to change the default path of the insert hyperlink dialog?

My database is outside of the directory of where we are linking to various files. My users often have to drill down through 5 or 6 subfolders to get to the file they need to link.

It would not be a big deal but we are going to have to do this for thousands of documents.

Any help or suggestions would be greatly appreciated!!

RE: Hyperlink Default Path

Hi, I don't know that you can change the dialog box path but if you are dealing with many files in many directories, it might be easier to build the hyperlink strings yourself.

As an example you can obtain the file names and directory paths using FSO and store the text strings in a table.  Convert the strings into a proper hyperlink path using a query and then change the text field to hyperlink.

It is fairly easy to do and there are a number of examples in this forum.

Much quicker than individual linking.

Hope that helps.

RE: Hyperlink Default Path

How are ya trevorwilliams2 . . .

Quote (trevorwilliams2):

... is possible to change the default path of the insert hyperlink dialog?
Yes its possible and can be done manually, but I doubt you'll attempt it for thousands of docs. So lets move on to the One-Shot Deal!

Before we begin be sure to copy the table with the hyperlink (structure & data) under another name. You'll use this table for testing ... leaving your origional safe.

I used an Update query with a custom function for speed and simplicity which worked out very well. So here we go ...

In a module in the modules window, copy/paste the following function:


Public Function ChangeHypPath(HypDat As String, NewPath As String) As String
   ChangeHypPath = "#" & NewPath & Right(HypDat, Len(HypDat) - InStrRev(HypDat, "\"))
End Function

Now the query:
  1. In query design view with the test table selected and the hyperlink field dragged to the first column in the query grid
  2. Select Update Query from the dropdown list of the Type Query toolbar button.
  3. On the Update To line enter:


    ChangeHypPath([HypLnk],"NewPath with ending backslash")
    Be sure you don't forget the ending backslash!
  4. Finally on the Criteria line enter


    Is Not Null
When your done the query grid should look like:


    Field: YourHyperlinkFieldName
    Table: TestTableName
Update To: ChangeHypPath([HypLnk],"D:\Database\Images\Cars\") 'Example!
 Criteria: Is Not Null
Thats it ... run the query!

Your Thoughts? . . .

  See Ya! .  .  .  .  .  .

Be sure to see thread181-473997: How To Get Good Answers To Your Questions  Worthy Reading! thumbsup2
Also FAQ181-2886: How can I maximize my chances of getting an answer?  Worthy Reading! thumbsup2

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close