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 a different mapping for the I drive 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.
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.
I noticed this issue in Word 2010. I don’t know if other versions of Word have the same issue. But it wouldn’t surprise me if they did.