How do I create links to documents using Office URI Schemes?
You can create links to documents in SharePoint based on how you want the documents to be opened (read-only mode, edit mode or create a document from a template). The syntax that you have to use is:
- To view a document:
- To create a new document from template:
Explanation of the different parts in the syntax:
- “Scheme-name” refers to the type of application that should be invoked. They 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” is mandatory and refers to how the document should be opened. The options are:
- View Document: “ofv”
- Edit Document: “ofe”
- New Document from Template: “nft”
- “Command-argument-descriptor-1” is mandatory. This element gives more information about what the command argument is about. The value to use is: “u”.
- “Command-argument” is mandatory and normally the URL to the document. The maximum path length is 256 characters for all apps except Excel, where the limit is 216.
- “Command-argument-descriptor-2” is optional and used when creating a new document from template and when you want to define the URL to the default folder that the file should be saved to. The value to use is: “s”.
- “Command-argument-2” is optional and defines the URL to the default save location, when creating a new document from template. The maximum path length is 256 characters for all apps except Excel, where the limit is 216.
Further information about Office URI Schemes can be read on this page.