Problem opening (desktop)word docs in Onedrive (does work when opened via ODFB online)

Copper Contributor


A user has the following problem:
When opening a word file which is in a onedrive folder (which is shared with her and which is synced with the onedrive tool) word will hang indefinite untill I close it again.

It cannot open the file in this way.

Diagnosis so far....

  • When going into  the folder via file explorer and checking the path length (including filename): 200 chars. I know word has a path limit of 218.
  • Tried repair word both quick and online option.--> Still does not work.
  • Start word in safe mode and with the /a mode -->does not work
  • DOES WORK when I pause the onedrive sync client :facepalm:
  • DOES WORK when I go to the file with onedrive online and choose open in word (the desktop app)
  • DOES WORK when I put the file one directory higher (shorter path)
  • Does NOT work when I first open word and then navigate to it by open file dialog. BUT gives me an error saying "the document name or path is invalid (20190731XX%20MeetingMinutes%20test.docx)"
  • DOES WORK when I open it on another pc in the exact same location (shared one drive folder) although I understand that in "c:\users\\\\....." the part is shorter in my case. BUT if I make a folder one dir higher and giveit long name and put the file in there it DOES work. So I do not believe it is the path length.
    I see in the splash screen of word that it is actually opening the file on ??? This is difference from the local path I thought I was opening it from "c:\users\\...." ?? I am lost?

    I really like to understand what is going on here?
    Can someone shed a light on this?

    I know a simple solution would be to put the file some dirs higher but I want to understand what is going on to prevent future problems

    I use ODFB, office365, word 2016, sync tool 19.123.0624.0005

10 Replies

Hi guys


When you see the file in Windows File Explorer, what does the Status show? Cloud icon? Green circle with green tick?


If it's the cloud icon for the file that is hanging, right click onto the file and choose Always keep on this device. which will download the file from the cloud to your PC and sync it to the online copy. 


Then open the file from Windows File Explorer and see if this fixes the issue.


If the file had the cloud status icon, tt may be that OneDrive was having an issue downloading and syncing the file to your PC when you open it.


Hope that gives you something to try towards a solution!


Good luck folks


@corvus71I just diagnosed what I'm guessing is the same issue for someone and you might be seeing a path length issue.  I think something changed between Word versions 1902 and 1911, but I'm not able to narrow it down any more than that.  The 2 workarounds I came up with are:


  1. Disable OneDrive's collaborative editing option.
  2. Switch to back the "Broad" (semi-annual) channel and test.  As of today, this is Word version 1902 for me.  These instructions are good if you're testing on a single machine.

I found it easiest to test if it's a path length issue by creating files with a lot of spaces in the names.  The spaces get encoded into %20 when opening the collaborative editing URL, so a filename with 60-80 spaces should be enough to trip the limit.  For example, the file:


C:\Users\username\OneDrive - Company Name\-  .docx


...ends up being something like this:




That example may not look like a big difference, but, for us, we have some customers with long company names which usually means a long domain name and domainGUID.  For example, "Rumpelstiltskin's Gold Spinners Inc." could look like:


That uses 115 characters before anyone creates a directory structure or adds any files.  I've set up accounts where the company name ends up being set to initials (ex: RGS) to save a few characters on the unchangeable OneDrive directory name on local PCs.  This change makes collaborative editing unusable in those cases.


To me it feels like an unintended bug since, as you pointed out, it's possible to open the file by jumping through Word Online's "Open in Desktop Client" link.


Path length issues like this are the biggest problem we have with Office 365 / OneDrive.  They're almost impossible to explain to regular users.  Personally I'm kind of hoping this issue trickles into the semi-annual channel and breaks collaborative editing for a lot of people.  Maybe then the path length issue will get some attention.

@Ryan Jaeb 


After reading your comment I started trying to find the pathlength again to get an idea about the actual allowed path length.

Using a document stored in a folder with a very long name I started adding spaces until it would not open anymore. Replacing all the spaces with "%20"  I get a path length of 220 as a limit. 221 characters and the file will not open anymore.

It would be nice if MS would have a statement somewhere about how long it is allowed to be.


Since all our users use the onedrive sync client they want some way to easily refer to a file stored locally. A shortcut would not work since all synced files have a %userprofile% in the link which makes a shortcut different for everyone.

For ease of collaboration they use folders like e.g. " some title" to easily communicate the location of a folder to colleagues. Instead of mentioning the very long path they say: " some title\A.docx". As you can guess the folder name gets very long by using a 6.x.x.x.x.x structure.


What users do as a workaround when the file does not open is:

Copy the file to their desktop. Work on it. Copy it back to the location were it came from. With a risk that someone else also worked in the document....

@corvus71The limit is 259 (218 for Excel).


However, based on my experience, it's really difficult to advise about an exact limit.  On the filesystem a space counts as 1 character.  The collaborative editing URL encodes it to %20, so 3 characters.  Plus the difference in %userprofile% path lengths that you mentioned can vary the length by several characters between users.


The hardest part for us isn't technically the limit.  It's the ambiguity which makes it impossible to explain to regular users.  If all of the Office apps would give an error when a user tries to use a path + filename that exceeds the limit, it's be much easier to deal with IMO.


I don't have any way of asking for the situation to be improved and, judging by the volume of similar complaints / questions I see online, I'm guessing it's a tough problem for them to solve.


Hopefully the info I gave is enough that you can do some additional testing and get an idea of what the limits are.  Good luck!

Our company also has this problem. No Onedrive office documents can be opened via the explorer anymore. However, via the Onedrive online display or a local copy, without using Onedrive is working. Is there a solution for this problem?


Do you mean NONE whatsoever? Indendant of the path length? In that case it must be something else...



Yes we tested a custom shorter path length/filename. That works.

But this problem occurs in last months. Before we didn't had the issues. This problem must be solved.

We can not simple shorten all the office file names from all office documents from the past. Why is this new problem happening?

@Ryan Jaeb thanks for the tip on disabling the collaboration feature on OneDrive.  This resolved my issue!

@Ryan Jaeb  thanks for the tip on disabling the collaboration feature on OneDrive.  This also resolved my issue!