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

Processing Information Pasted from a PDF File

When pasting information copied from a PDF file, you can end up with a paragraph for each line of the original document. ...

Discover More

Using the Organizer to Manage AutoText

There are times you need to move your AutoText entries from one template or document to another. Use Organizer to do this ...

Discover More

A Shortcut for Switching Focus

Word provides keyboard shortcuts for lots of things, but it doesn't provide one for switching to the desktop and back to ...

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)

Full Path Names in Excel

Need to know what the full path name is for the current workbook? With a simple macro you can display the full path name ...

Discover More

Correctly Saving Delimited Files

Delimited files are often created through Excel so that your data can be exported to other programs. If the delimited ...

Discover More

Finding the Size of a Workbook

Keeping tabs on the size of a workbook can be important when using Excel. You have a couple of options that will allow ...

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

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.