How are ya trevorwilliams2 . . .
trevorwilliams2 said:
[blue] ... is possible to change the default path of the insert hyperlink dialog?[/blue]
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 [blue]One-Shot Deal![/blue]
Before we begin [red]be sure to copy the table with the hyperlink (structure & data) under another name. You'll use this table for testing[/red] ... [green]leaving your origional safe.[/green]
I used an [blue]Update[/blue] 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:
Code:
[blue]Public Function ChangeHypPath(HypDat As String, NewPath As String) As String
ChangeHypPath = "#" & NewPath & Right(HypDat, Len(HypDat) - InStrRev(HypDat, "\"))
End Function[/blue]
Now the query:
[ol][li]In query design view with the [blue]test table selected[/blue] and the [blue]hyperlink field dragged[/blue] to the first column in the query grid[/li]
[li]Select [blue]Update Query[/blue] from the dropdown list of the [blue]Type Query[/blue] toolbar button.[/li]
[li]On the [blue]Update To[/blue] line enter:
Code:
[blue]ChangeHypPath([HypLnk],"[purple][b]NewPath with ending backslash[/b][/purple]")[/blue]
[purple]
Be sure you don't forget the ending backslash![/purple][/li]
[li]Finally on the [blue]Criteria[/blue] line enter
[/li][/ol]
When your done the query grid should look like:
Code:
[blue] Field: YourHyperlinkFieldName
Table: TestTableName
Update To: ChangeHypPath([HypLnk],"[purple][b]D:\Database\Images\Cars\[/b][/purple]") [green]'Example![/green]
Criteria: Is Not Null[/blue]
Thats it ... run the query!
[blue]Your Thoughts? . . .[/blue]
See Ya! . . . . . .
Be sure to see thread181-473997 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
Also faq181-2886 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)