Office file in SharePoint fails to open in app when clicking file name

Chris Morelock 0 Reputation points
2024-11-06T18:20:34.0733333+00:00

We have a SharePoint library that uses Document Sets. The library and Document Set content type are configured to use the classic Welcome Page to display each document set. We have MS Office files (PPTX, XLSX, etc) within the document sets. Also the library is configured to open Office files in the client application by default. When we click the file name for an Office file within one of these document sets, then SharePoint is directing the external handler to open the file READ ONLY by means of the URI Scheme that it uses. For example, opening a PPTX file in this way will use the scheme: ms-powerpoint:ofv|u| . See: https://learn.microsoft.com/en-us/office/client-developer/office-uri-schemes#appendix-b---uri-scheme-registration-template-for-ms-powerpoint-scheme.

User's image

The first problem is that SharePoint is directing the files to open READ ONLY. The more important problem is that large MS Office files (maybe 20 - 30MB in size, and above) are failing to open altogether. In this case, the Office application does open (if it is not already open), but the file does not open--no error messages are given and there are no other indications about what is wrong.

Note that we can right-click the MS Office files and choose "Open in PowerPoint", for example. In this case, SharePoint directs to open the file in EDIT mode (using the URI Schema: ms-powerpoint:ofe|u| ), and the large PPTX file, for example, opens successfully.

I know that the Welcome Page for Document Sets is older technology, but it provides functionality that we depend on that is not otherwise available. Opening MS Office files within these document sets did not previously behave this way. Can anything be done?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,931 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 19,090 Reputation points Microsoft Vendor
    2024-11-07T06:23:31.8333333+00:00

    Hi @Chris Morelock,

    There are a number of reasons for the problem regarding your file opening in read-only mode:

    First of all, if some of your files for example are less than 6MB are opened in edit mode and other files are opened in read-only mode are. This is most likely due to the limitations of the FileWriteChunkSize property. We need to change it to something bigger.

    Check the value of FileWriteChunkSize in SharePoint Management Shell (Specify your own Web Application URL) by using the following commands:

    $webapp = Get-SPWebApplication http://sp2013
    $webapp.WebService.FileWriteChunkSize | Write-Host
    

    If the value is not equal to 64320, reset the value of FileWriteChunkSize to the default value of 64320 by using the following commands:

    $webapp.WebService.FileWriteChunkSize = 64320
    $webapp.WebService.update()
    

    Reference: Some Office files open in read-only mode in SharePoint Server 2013.

    Second, if large Publisher files that are more than 50 megabytes (MB) open in read-only mode, we need set the FileSizeLimitInBytes registry key to a value more than 50.

    User's image

    Reference: Large Publisher files open in read-only mode.

    Third, it's likely that your file protection program is trying to prevent viruses so it's opening your files in read-only mode or it's opening your files in protected mode by default. This is recorded by Microsoft, and you can refer to this article for troubleshooting and solution: SharePoint files open as read-only.

    Regarding your issue with large files not opening, it's most likely affected by read-only mode, or it could be something else. Since we're not getting an error indication, I suggest you check SharePoint ULS Log to see if there's a relevant error message. Looking at the log we can pinpoint the problem more precisely.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 19,090 Reputation points Microsoft Vendor
    2024-11-08T09:20:54.0733333+00:00

    Hi @Chris Morelock,

    I apologize that my initial response strayed from your question.

    I found in my SharePoint Online environment:

    Double clicking on a file in Document Set in Classic Mode opens it in read-only mode.

    Double-clicking on a Document Set in Modern Mode opens it in Edit Mode.

    All my colleagues have the same experience. This is most likely the default behavior of SharePoint. Because we don't have a setting to specify the mode in which the document is opened.

    You can try the following:

    • Instead of double-clicking, use the "Open Menu" (three dots) and select "Edit".
    • Once you have opened the read-only file, click the button to turn on editing. User's image

    As for the file being too large to open, I tried uploading a 22M file. It opened normally but it opened a bit slowly. It took about 2 to 3 minutes or so.

    The network or Office Applicaiton may cause this large file to get stuck when opening.

    Please check your network status and try reinstalling the latest Office Applicaiton to see if the problem subsides.

    These are the only factors I can find so far that could potentially affect the problem not opening. I am trying to find other factors that may be affecting the problem. I will keep you informed as soon as there is any progress. Thank you for your patience.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Ling Zhou_MSFT 19,090 Reputation points Microsoft Vendor
    2024-11-13T07:27:00.7333333+00:00

    Hi @Chris Morelock,

    Really appreciate the reply.

    Regarding your mention of opening the file in Safe Mode first and then in SharePoint being able to open the file in the application, I consulted my office colleague.

    The safe mode is to open the file with macros and com add-in disabled. Maybe those files you can't open contain macros and com add-in, you can check it.

    If it is macros or com add-in that's causing the problem, then I would suggest you open it in the application by using right-click. Most likely double clicking doesn't work well with macros and com add-in in the file.

    If it is not these macros or com add-in causing the problem, then I am sorry to say that we have done an in-depth query but still can't find the exact cause of the problem. If this double-click to open the file is important to you, I suggest you take a support and ask. A more specialized engineer will be able to solve the problem for you.

    Navigate to your M365 Center > Support >Help & Support

    User's image

    We apologize for any inconvenience this may cause and thank you for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  4. Ling Zhou_MSFT 19,090 Reputation points Microsoft Vendor
    2024-11-11T06:05:34.5066667+00:00

    Hi @Chris Morelock,

    Thank you very much for your reply.

    I was testing in classic mode for opening large files and I was able to open the file correctly.

    I have done further searches on this issue but there seems to be very few issues with files not opening. I think we need to run some tests to narrow down the source of the problem:

    1. There is a tiny but important issue. Make sure your office login has permissions to the file you want to open. Sometimes inconsistencies in the accounts of the two apps can cause the file to not open.
    2. We suggest you test on other classic sites if all classic sites have the same problem. If not all sites experience the same, then most likely something is wrong with this site, and we suggest you recreate it.
    3. Try to open the file in Safe Mode in office app. Open Office apps in safe mode on a Windows PC - Microsoft Support
    4. I suggest you use the latest version of office 365 to open the file. If you are using the latest office 365, I suggest you download and run this program to clear the Office related account cache information.
    5. If the problem persists, try to download the file from the SharePoint and try to open in office app. Confirm that our office app is fine with this step.

    Hopefully these will help you with your problem. Please let us know if you have any questions. We'll do everything we can to help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

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