Issue with hyperlinking documents

Copper Contributor

Hello, 

I have a user that is having some issues when hyperlinking word documents. Is there a way to change the default file type index/search? (See screenshot below).

The reason this is an issue is that the user have to change to "All Files" every time and didn't always have to do that, it used to be the default. This user does this hundreds of times a day so i was hoping to save them some clicks by changing the default to "All files". I have a different user that have that as the default so i know it should work i just cannot seem to find the setting or the name of that file type box marked below.

 

Any help is appreciated!

 

Search index.png

3 Replies

@RasmusP Using a macro with the following code will display a file picker dialog with the file type set to All Files (*.*) and then when a file is selected, a hyperlink to that file will be inserted with the text that was selected when the macro was run as the display text.

 

Dim FD As FileDialog
Dim strAddress As String
Set FD = Application.FileDialog(msoFileDialogFilePicker)
With FD
    .Title = "Select the to which you want the link to address."
'    .InitialFileName = " insert path to desired folder"
    .Filters.Clear
    .Filters.Add "All Files", "*.*"
    .AllowMultiSelect = False
    If .Show = -1 Then
        strAddress = .SelectedItems(1)
    Else
        MsgBox "You did not select a file."
        Exit Sub
    End If
End With
ActiveDocument.Hyperlinks.Add Selection.Range, strAddress, , , Selection.Text

@Doug_Robbins_Word_MVP 

 

Thanks Doug,

I've been trying to get this macro to work but i can't seem to get it to work. I don't have much experience with macros so i tried following guides but for some reason it's still not working. Any suggestions?

 

Otherwise the ideal solution would be to just change the setting instead of creating a click elsewhere like this macro would do.

@RasmusP Did you put the code inside a Sub macroname() End Sub construction such as

 

Sub InsertLink()

[put code here]

End Sub

 

It you assign the macro to a button on the quick access toolbar, I believe that your user will find it to be an easier way to insert a hyperlink.