Sharepoint path lentgh causing issues in Microsoft Word

Darius Cargill 0 Reputation points
2026-07-15T21:14:02.9466667+00:00

We have a large Sharepoint where we break down multiple sections. When syncing data with One Drive on the local computer the full Sharepoint length is copied over also. When attempting to open a doc I am receiving an error . Cannot open with over 259 characters. Is there a way to remedy of fix this issue with out shorten Sharepoint locations?

Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 96,510 Reputation points MVP Volunteer Moderator
    2026-07-15T21:21:51.91+00:00

    This issue is caused by the Windows maximum path length limit rather than SharePoint or OneDrive itself. When OneDrive syncs a SharePoint library, it recreates the complete folder hierarchy on the local computer. If the combination of the local sync location (for example, C:\Users\<User>\OneDrive - Company\), the SharePoint library name, nested folders, and the file name exceeds the supported path length, Windows or some applications may be unable to open the file and display errors like yours.

    One possible solution is to enable long path support in Windows. On Windows 10 and 11, you can enable the Enable Win32 long paths policy through Group Policy or set the corresponding registry value (LongPathsEnabled=1). However, this only helps applications that are designed to support extended-length paths.

    More at https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation

    If enabling long paths does not resolve the issue, consider reducing the local path length instead of changing the SharePoint structure. For example, configure OneDrive to sync to a shorter local folder (such as C:\OD\) if organizational policies allow, or use OneDrive's Add shortcut to OneDrive feature selectively rather than syncing entire libraries. Syncing only the folders users actually need can also significantly reduce path lengths.

    If restructuring the SharePoint hierarchy is not feasible, another option is to access deeply nested files directly through the SharePoint web interface instead of the locally synced copy. This avoids the Windows path length limitation altogether while still allowing users to work with the documents.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.