# How to Open a Hyperlink to a Folder from an Office Document in the Windows Explorer Instead of the Browser?

Using Office 365 and SharePoint, shared files in the cloud that are opened in the desktop applications (e.g. Excel) show an SharePoint URL-version of relative hyperlinks to files and folders. When setting the appropriate settings for the SharePoint Site, documents like .xlsx or .pdf are opened in the desktop applications instead of the web browser. However, links to directories are still opened in the Browser. How can Excel (or SharePoint) be instructed/force to open hyperlinks to directories on the client, i.e. in the Windows Explorer instead?

Further explanation:

In Excel e.g. the link when edited looks like this: path/to/project_dir When hovering over the hyperlink, however, the link looks like this: https://cmpny.sharepoint.com/sites/ShareName/Freigegebene%20Dokumente/General/path/to/project_dir

And even though the SharePoint is synced locally through OneDrive, the directory is opened in the web browser. Unfortunately, this means that different files in that directory (e.g. AutoCAD files) cannot be opened properly, because opening them in the browser will download a copy of the file instead of opening the synced local version.

OneDrive >>> Settings >>> Office >>> uncheck "Use Office applications to sync Office files that I open."

This fixed all our problems with hyperlinks - both files and folders.

• Thank you, this is actually worked! I never would have thought this option causes hyperlinks to open in the browser! When turning it off, the hyperlinks to local folders open in Windows Explorer.
– BFSH
Apr 5 at 18:27

As far as I know, this is not controlled by SharePoint.

• Fair enough, but Excel does convert the link without asking based on the fact that the document is stored on a SharePoint server, i.e. if the file was not stored on SharePoint this issue would not exist. Therefore I think the question is very related to SharePoint. Am I wrong?
– BFSH
Oct 7 '20 at 8:32
• I am not sure what information you need. I am trying to open a local Windows directory from a hyperlink inside Excel. If the file is hosted on SharePoint, the link will open the SharePoint website. But I want to open the Windows Explorer instead.
– BFSH
Mar 7 at 20:21

Not sure if this is at all helpful but here goes my workaround:

I mapped the SharePoint link to a network drive.

For example, I mapped Z drive to: https://cmpny.sharepoint.com/sites/ShareName/

and then on excel, the hyperlink would be Z:\Freigegebene%20Dokumente\General\path\to\project_dir This will open up in File Explorer.

Just a few caveats though - This will work only for you, unless someone else has the same mapped drive & path. Also, you might only want to use this method for viewing files (not changing them) since other users can "Check out" via SharePoint.

• It's a good idea but this Excel file is shared among multiple users and therefore the hyperlinks should be relative (not absolute). Using a mapped drive seems relatively error-prone in that regard. I have found a working hack by reading the Excel memory through a binary written to disk via VBA macros.
– BFSH
Mar 7 at 20:16

Yeah, similar to user94662 showed, although directory path will vary, you can look at the links and see that:

• if the link has forward slashes, you have the link that directs to browser
• if the link has backward slashes, you have the link that opens via desktop

1. I open the folder on web... copy the address from address bar. you will see something like "something.sharepoint.com/something/sharepoint-name/sharepoint-folder/something.Aspx" ...followed by a bunch of symbols.

2. Delete the last parts to get something like: "something.sharepoint.com/something/sharepoint-name/sharepoint-folder/"

3. Open windows explorer, paste the address into the directory/address bar at the top to navigate to the sharepoint folder through windows explorer.

4. Right click any file to see Properties. Next to "Location:" you will see the path formatted in WINDOWS backslash format e.g., "\something.sharepoint.com@SSL\Root\something\sharepoint-name\folder"

5. Just append the file name to the end of this path, and it will be a link that ALWAYS opens via the desktop app (in my experience).

Note (1): steps 1-4 may also be equally accomplished by copying the path from windows explorer address bar when you're inside the mapped drive (...not totally sure, but I think so).

Note (2): There is a faster way to get the link, but it doesnt always work and I dont know why. Any time you have a sharepoint file open in desktop app, you can click the File menu and it opens "Info" tab first. Look under the big file title to see the directory path which you can right-click and select "Copy File Path". This USUALLY is the path in backslash \ desktop format (the SSL url with file name already appended). Sometimes...it automatically is converted to web (forward slash) format. Anyway, those are my workarounds. Hope it helps.

• Alternatively, if Excel is converting your links automatically but undesirably --- what happens if you tuck your current URL inside of Excel's hyperlink function, rather than directly pasting a link into a cell? Mar 5 at 16:12
• The problem is, that if you want to open a directory (not a file), for example a link to the project folder on your local drive, it will open the web browser instead. It might work to open a file in the local desktop application, but try it with a link to some folder... It's just ridiculous! I worked around this problem by insane VBA macro usage---actually reading the memory of Excel through a binary. I might share the code if there is interest in this hack. Shame on Microsoft for making this so unnecessary hard.
– BFSH
Mar 7 at 20:12
• BTW, your "Note (2)" was the reason I started reading the memory of Excel, because obviously, Excel does know the location on disk! In my experience, this button is always opening the local directory as long as the file is synced to local disk.
– BFSH
Mar 7 at 20:18

I cheated this a bit, by creating a blank excel file in the folder I want to open, creating a hyperlink to this blank excel file and then file > info > open file location - opens locally. Way too many steps IMHO. This needs to be fixed and option to open stuff locally added.