Skip to content
Home » Office » Make a Word hyperlink UNC path

Make a Word hyperlink UNC path

I had an issue in a document with a hyperlink to an existing file. The file existed on a network drive, so the link worked fine… until someone with different drive mappings than me had to look at the document. Then the link didn’t resolve and the person got an error message. A confusing error message. It turns out it’s tricky to make a Word hyperlink UNC path.

Fixing it wasn’t as easy as it should have been.

I immediately reopened the document, edited the link, and changed the link from I:\security\reports\report.xls to \\server\internal\security\reports\report.xls, then sent it back to him. He quickly replied back with the same error message.

I opened the document again, looked at the link, and Word, for some reason, noticed that \\server\internal was my I: drive, and decided to change it back. Word was trying to be helpful. I get it. But Word never met this guy.

Keep network drive mappings from confusing Word

The first thing I had to do to fix the issue was to disconnect my I: drive. You can open up Computer or My Computer (depending on the version of Windows you’re running), right-click on the drive, and click Disconnect, or you can issue the command net use i: /d from a command prompt. I use the command prompt, but I’m in the minority on that these days.

Once Windows had forgotten about the I: drive, I recreated the link using its UNC path. Then I verified it worked by clicking on the link.

I saved the document, then re-mapped my I: drive. Here’s how. Right-click on Computer or My Computer. Then type the UNC path of the share (\\server\internal in this case; I can pretty much guarantee yours won’t be quite that nice).

Or enter the command net use I: \\server\internal from a command prompt. You could also log off and back on, but I prefer not to interrupt my other work.

I retested the document several times with my I: drive both connected and disconnected, and had someone else check it several times too, because the original receiver was starting to get rather upset and I wanted to make sure it was fixed for good this time.

When to use a Word hyperlink UNC path

This raises a best-practices question. Is it better to use a Word hyperlink UNC path, or a network drive path?

The answer depends. If everyone’s drive mapping is the same and you’re sure of it and the logon scripts work every single time, you’re better off using the network drive path. That way, if the shares ever migrate to a new server, the paths still work. This happens sometimes, and not everyone uses DFS to keep UNC names consistent and unmovable.

But if you’re sharing between organizations, use UNC paths. If you have people in your organization who are in the habit of undocking their laptops at night, taking the machines home, and redocking them in the morning, use UNC paths. This sometimes causes network shares to disconnect without warning. You’ll have a problem if the server ever migrates. But in the meantime, as long as the person has access to the path and a network connection, you can be certain the UNC path will work.

Just keep in mind if someone has the UNC path mapped to a local drive letter, Word will helpfully change it. If the person who opens the file proceeds to save it, it will break the link again. So be careful who has write access to the document if a broken link in a document is a fire-able offense.

A workaround if unauthorized changes to a document is a problem

If accidental changes to a document are a problem, or if formatting absolutely, positively must always be consistent, save the document as a PDF and use the PDFs for working copies. Different versions of Word can and will interpret a document slightly differently. Broken tables of contents and blank table of contents entries are the most common issue I found, but certainly not the only ones.

Keep an archive of the original copies for your technical writers to use when creating future revisions, but use PDFs for distribution. It will save you a ton of headache.

I’ve also used the PDF trick when a document just won’t print correctly from Word.

If you found this post informative or helpful, please share it!
%d bloggers like this: