ProtocolHandler.exe and Office URI Scheme no longer working in some Office 2019 installations

Brad Erickson 31 Reputation points
2023-03-16T21:32:18.27+00:00

We have a web application where we have been successfully using the Office URI scheme to open network documents in Word for the end-user from their browser. For example, we would have the browser redirect to this in order for it to open the specified document in Word to be edited:

ms-word:ofe|u|file://NetworkServer/Share/DocumentToOpen.docx

This functionality has worked for us in Office 2019 and Office 365 without issue for multiple years now.

Just recently (we believe with a Windows or Office update sometime in the timeframe of February/March 2023) we began experiencing issues with using the Office URI scheme with Office 2019 on some PCs that were previously using this functionality without issue.

We noticed that the file path that gets sent to Word began being appended with query strings when the Office security dialog asked for confirmation to open the file.

For example, the Office security dialog will now show the Address of the file as something like this:

Address: file:///\NetworkServer\Share\DocumentToOpen.docx?OR=ProtocolHandler&CID=D3E06AE0-15BB-4B0A-9FCE-E174FAE9208B&CT=1678977022808

When previously, when it had been working, it would just show the address like this:

Address: file:///\NetworkServer\Share\DocumentToOpen.docx

Now that this extra information is being appended to the file path, some installations of Office 2019 appear to be unable to open the file. After confirming the security dialog, we receive this error from Word:

Sorry, we couldn't open "\NetworkServer\Share\DocumentToOpen.docx?OR=ProtocolHandler&CID=D3E06AE0-15BB-4B0A-9FCE-E174FAE9208B&CT=1678977022808".

On some Office 2019 installations, we have received the error a single time, then after that, opening the files via the URI Scheme works fine and the additional information is no longer appended to the path in the security dialog.

On some other Office 2019 installations, however, the issue persists and we are never able to open the file.

To remove the browser from the equation, we have tried running the Office Protocol Handler directly through a command prompt like this, and it produces the exact same results, so the issue appears to be with Office itself:

"C:\Program Files\Microsoft Office\Root\Office16\protocolhandler.exe" "ms-word:ofe|u|file://NetworkServer/Share/DocumentToOpen.docx"

On our machines running Office 365, we are seeing the extra information appended to the path during the security dialog, but Office 365 always seems to successfully open the file regardless (for now...).

Has anyone else experienced this issue, or does anyone have any ideas on what might be causing the error?

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,299 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,484 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Brad Erickson 31 Reputation points
    2023-03-20T14:06:01.5433333+00:00

    Performing a full uninstall of all Office products and re-installing Office 2019 fresh and re-updating it to the latest version appears to have resolved the issue for the impacted machines. These machines then exhibit the behavior that we are seeing on other Office 2019 installations where the error occurs a single time, then begins working properly moving forward.

    0 comments No comments