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

Understanding Fill Effects

Want to fill a drawing object with different types of effects? Excel provides several effects that can make your drawing ...

Discover More

Keep with Previous

Word allows you to format a paragraph so that it is on the same page as whatever paragraph follows it. You may want, ...

Discover More

Adding a Very Heavy Cell Border

Excel allows you to add borders to a cell or range of cells. If the available borders aren't exactly as you desire, you ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Opening Non-Excel Files

Not all data is created in Excel. Indeed, you may have data in files created by many other types of programs. You might ...

Discover More

Personal.xls File Not Opening

The Personal.xls workbook is used primarily to store macros that you want available through all of your workbooks. ...

Discover More

Cannot Double-Click to Open a Workbook

When you double-click on a workbook in Windows, the Excel program should be started and the workbook loaded. When this ...

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 2 + 2?

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.