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

Retrieving Drive Statistics

Need to gather some information about the drives on a system? It can be pretty easy to do using a macro, as shown in this ...

Discover More

Finding Text in Text Boxes

Want to search for text that may appear in a text box rather than in a regular worksheet cell? You can only perform the ...

Discover More

Default Font for Comments

Want your comments to stand out a bit more than normal or, to the contrary, to be minimized? You can affect how comments ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Making Changes in a Group of Workbooks

If you need to change the same data in a large number of workbooks, the task can be daunting. Here are some ideas (and ...

Discover More

Comma-Delimited and MS-DOS CSV Variations

Excel provides different file formats you can use to export your worksheet information. One such file format is CSV, or ...

Discover More

Pulling Filenames into a Worksheet

You can use Excel for all types of data processing. You may want to work with filenames in a worksheet, but the first ...

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 8 - 5?

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.