14

Microsoft Office Documents register custom url protocol on the client computer.

This is especially used by SharePoint. For example, if I open an excel file, I see the call to this url :

ms-excel:ofv|u|https://mycorp.sharepoint.com/Documents/somefile.xlsx

Is there any available documentation of this feature?

What are the format and options of these urls?

3 Answers 3

24

There is limited documentation available here. These protocol handlers appear to only support http and https URI.

To summarize, Microsoft office registers the following protocol handlers:

  • ms-word:
  • ms-powerpoint:
  • ms-excel:
  • ms-visio:
  • ms-access:
  • ms-project:
  • ms-publisher:
  • ms-spd:
  • ms-infopath:

To view a document:
ms-excel:ofv|u|http://contoso/Q4/budget.xls

To edit a document:
ms-powerpoint:ofe|u|http://www.fourthcoffee.com/AllHandsDeck.ppt

To Create a New Document from a template:
ms-word:nft|u|http://cohowinery/templates/elegance.pot|s|http://cohowinery/presentations

There is currently no protocol handler registered on Microsoft Windows to launch Power BI.
Support is available on mobile platforms (including Windows Mobile) via the mspbi protocol handler. The following is a summary of the official documentation which is available here.

Open the Power BI mobile app:
mspbi://app/

Open to a specific dashboard:
mspbi://app/OpenDashboard?DashboardObjectId=<36-character-dashboard-id>

Open to a specific tile in focus:
mspbi://app/OpenTile?DashboardObjectId=<36-character-dashboard-id>&TileObjectId=<36-character-tile-id>

Open to a specific report:
mspbi://app/OpenReport?ReportObjectId=<36-character-report-id>

Open a specific report page:
mspbi://app/OpenReport?ReportObjectId=<36-character-report-id>&reportPage=ReportSection<number>

Open in full-screen mode (for Windows Mobile devices only):
mspbi://app/OpenReport?ReportObjectId=500217de-50f0-4af1-b345-b81027224033&openFullScreen=true

10
  • 1
    So those protocols does not support file:// in the URI? Jun 27, 2018 at 16:35
  • 1
    @RudolfDvoracek it does not appear so at this time. There is no documentation on the topic and hacking at it, I could not make file:// work
    – codechurn
    Jun 27, 2018 at 18:57
  • 2
    Really frustrating that this doesn't support file:// Aug 26, 2019 at 10:48
  • 6
    It does support ˋms-word:ofe|u|C:/path/to/file.docxˋ, though. Forward slash, not backslash. Apr 8, 2020 at 11:12
  • 2
    @AndreasLinnert your suggestion works, but only if there is no spaces in path. Is there a workaround for that also? I tried '+', '%20, but nothing works.
    – Silko
    Jul 15, 2020 at 13:41
4

Since i do not have the reputation to comment, here is a solution for local files, which seems to work for me (Microsoft 365 MSO (16.0.13530.20490) 64-bit):

"C:\Program Files\Microsoft Office\root\Office16\protocolhandler.exe" "ms-powerpoint:ofe|u|file:///C:/path/to/file with spaces.pptx"

Important to note are the forward slashes. Also if you use the wrong program, i.e. use ms-powerpoint for .xlsx files, this will fail. protocolhandler.exe is located in the Office root directory, which might be in another location on your system (it's the directory where WINWORD.EXE, POWERPNT.EXE etc. are located)

0

If you want to open local file, maybe try:

ms-excel:file:/Users/river/Desktop/2.xlsx

ms-word:file:/Users/river/Desktop/2.doc

...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.