Stopping Excel from Converting UNC Paths to Mapped Drives

Written by Allen Wyatt (last updated July 3, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


2

Kimani has noticed that links in his workbooks are automatically updated from UNC paths to the mapped drives of the user who opened the file. This causes problems because other users don't use the same drive mapping. If Excel didn't do the conversion, then those users would be able to use the links via the UNCs that were used when the workbook was created. Kimani wonders why Excel updates the links based on the local system drive mapping and how he can force it to use the original UNC paths.

The short answer is that there is no way to stop Excel from doing the link updating. This can be a real bother, too. Microsoft discusses the problem in the following Knowledge Base article:

http://support.microsoft.com/kb/328440

The Knowledge Base article indicates that if a workbook is opened from a mapped drive, and the UNC refers to that same drive, the UNC in the link is updated to the mapped drive designation. The article doesn't provide any solution to this problem, other than the implication that the user could open the workbook using a UNC instead of a mapped drive. For most organizations this isn't a real solution.

One approach is to not allow people to change the workbook. Make it read-only and force people to save their changes at a different location. This is a viable approach if the workbook serves as a way to distribute information where changes don't need to be available to others in the organization. If others need to see the changes, however, it isn't terribly viable.

The only possible approach we've run across is to do away with the direct UNC references and use the INDIRECT worksheet function to build your references. These would not be rewritten by Excel, but it does present other drawbacks. (For instance, the target workbook must be open in order for INDIRECT to fetch the linked information.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7301) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Deleting an AutoText Entry

At some point you may want to delete an AutoText entry you previously created. Here are the steps to follow.

Discover More

WordTips Ribbon 2020 Archive (Table of Contents)

WordTips is a weekly newsletter that provides tips on how to best use Microsoft's word processing software. At ...

Discover More

Getting Files Out of Compatibility Mode

Work with a document that uses an older file format, and Word lets you know you are using compatibility mode. What is the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Locked File Puzzle

What would you do if every time you opened a workbook Excel told you it was locked? Here's how you can try to recover ...

Discover More

Creating a CSV File

Need to get your data into a format that can be easily read by other programs? Chances are good that a simple CSV file ...

Discover More

Seeing Full File Names in the Files Menu

Wouldn't it be great if you could look at the files in the MRU list and see the full path and file names? Excel condenses ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 9?

2023-01-09 05:54:02

Peter

UNC paths is the worst, you can never chance servers. Drives is the way to go, and make sure drives are consistent.


2021-08-19 02:18:29

Roy

Excel opens such files via either method, UNC or mapped drive, by the user's choice. Once opened using a UNC location, it will not change UNC addresses. Once opened using a mapped drive, it WILL change them. When the user saves, the file keeps the addressing used. Even better, if opened via the UNC address, EVEN IF the user has an equivalent mapped drive that would have been the source of trouble if opened via such an address, Excel will maintain the UNC addressing: it will not change over to mapped drive addressing.

The key then is to ensure the users all open the file via UNC addressing so that things stay as they are. There's really only one solid way to achieve that. Force the user to open the file as desired, in this case via UNC addressing. Create a file with either a macro firing on opening that opens the target file using the UNC addressing. The addressing will not change and when he saves, it's still good. For good measure, put the file somewhere new so that no one has any lying excuse for opening it directly: they'll see where it is if they wish, and clearly could open it or the macro won't open it for them either. But no excuse that it "just somehow happened... don't know what to tell you man... you gotta up your game, I guess."

The devil in the details is what do you do when you use both kinds of addressing? And so do they? And of course, their drive mappings are all over the... map... So none work for anyone else. However you decide to force it to be opened, the other addressing will change and be saved.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.