You can create links to documents in SharePoint based on how you want the documents to be opened (View document, Edit document or New document from template). The syntax that you have to use is:[Scheme-name]:[Command-name]|u|[Command-argument-1]
Examples:
- To view a document:
ms-word:ofv|u|https://contoso/documents/budget.docx
- To create a new document from template:
ms-word:nft|u|https://contoso/templates/budget.dotx
Explanation of the different parts in the syntax:
- “Scheme-name” refers to the type of application that should be invoked. The options are:
- MS Word: ms-word
- MS PowerPoint: ms-powerpoint
- MS Excel: ms-excel
- MS Visio: ms-visio
- MS Acess: ms-access
- MS Project: ms-project
- MS Publisher: ms-publisher
- MS SharePoint Designer: ms-spd
- MS InfoPath: ms-infopath
- “Command-mame” refers to how the document should be opened. The options are:
- View Document: ofv
- Edit Document: ofe
- New Document from Template: nft
- “Command-argument-1” defines the URL to the document. The maximum path length is 256 characters for all apps except Excel, where the limit is 216.
A simple way to create a URI link for a document is:
- Select the document and click on the “Open in” function, on the horizontal toolbar:
- In the dialog window that pops-up, right-click the “Open in app” button and select the “Copy link” option:
- The copied link will be something like this:
ms-word:ofv|u|https://contoso/documents/budget.docx - Now, the only thing you need to do is to eventually change “ofv” to either “ofe” (if you want to edit the document) or to “nft” (if you want to create a document from template).
Note
- Previously, it was also possible to define the default location to where files should be saved to, when creating a document from a template. Unfortunately this is not supported any more and Microsoft has no plans to fix this. The URI syntax for this was:
[Scheme-name]:[Command-name]|u|[Command-argument-1]|s|[Command-argument-2]
Where “Command-argument-2” defined the URL to the default folder where the files should be saved to. - Further information about Office URI Schemes can be read on this page.
Discover MetaShare
Metadata-centric document management system in Microsoft 365/SharePoint
- Eliminates annoying gaps in standard SharePoint
- Ensures data in SharePoint is well structured
- Structures with metadata instead of storing in traditional folders
- Centralized and simplified administration
- Orchestration/provisioning of settings
- Refined Enterprise search