If you are finding way of integrating "Office Web Apps(OWA)" with your custom solution which built with SharePoint CSOM/ JSOM or with integration of any client site development. Specially in a scenario where you develop your own "SharePoint display template" following integration points will be useful;
View in office web apps
Following link will work; if your requirement is to open your document in OWA. This can be done with simply appending parameter as below;
[code]<uri to your document>?Web=0[/code]
Eg:
http://mydomain.local/sites/OWASite/Documents/TechCentro.docx?Web=0
Edit SharePoint documents in OWA
Following way of integration with the Office Web apps which let you to pick your action is; means that whether your action may be read, edit or your default setting.
[code]<Web absolute URi>_layouts/15/WopiFrame.aspx?sourcedoc=<Relative URi to document>&action=<Your action>[/code]
Summary of actions as below;
Eg:
http://mydomain.local/sites/OWASite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/OWASite/Documents/BestPractices.docx&action=edit
You can be changed the default behavior with following approach
https://technet.microsoft.com/en-us/library/ee837425.aspx?f=255&MSPPError=-2147217396
Building URL to the Office Web Apps
If you thinking about how to build your URL; following illustration may be useful.
[code language="javascript"]
var owauri="_spPageContextInfo.webAbsoluteUrl" //absolute URL of the SharePoint site
+"/_layouts/15/WopiFrame.aspx?sourcedoc=" //static phrase
+"/sites/OWASite/Documents/TechCentro.docx" //Relative URL to the document
+"&action=edit //Action parameter
[/code]
Useful resources
https://technet.microsoft.com/en-us/library/ff431685.aspx
View in office web apps
Following link will work; if your requirement is to open your document in OWA. This can be done with simply appending parameter as below;
[code]<uri to your document>?Web=0[/code]
Eg:
http://mydomain.local/sites/OWASite/Documents/TechCentro.docx?Web=0
Edit SharePoint documents in OWA
Following way of integration with the Office Web apps which let you to pick your action is; means that whether your action may be read, edit or your default setting.
[code]<Web absolute URi>_layouts/15/WopiFrame.aspx?sourcedoc=<Relative URi to document>&action=<Your action>[/code]
Summary of actions as below;
&action=default -> Gets default setting of the documents
&action=view -> Open office app as a read only
&action=edit -> Open office app as editable
Eg:
http://mydomain.local/sites/OWASite/_layouts/15/WopiFrame.aspx?sourcedoc=/sites/OWASite/Documents/BestPractices.docx&action=edit
You can be changed the default behavior with following approach
https://technet.microsoft.com/en-us/library/ee837425.aspx?f=255&MSPPError=-2147217396
Building URL to the Office Web Apps
If you thinking about how to build your URL; following illustration may be useful.
[code language="javascript"]
var owauri="_spPageContextInfo.webAbsoluteUrl" //absolute URL of the SharePoint site
+"/_layouts/15/WopiFrame.aspx?sourcedoc=" //static phrase
+"/sites/OWASite/Documents/TechCentro.docx" //Relative URL to the document
+"&action=edit //Action parameter
[/code]
Useful resources
https://technet.microsoft.com/en-us/library/ff431685.aspx
You've provided some very useful information. I'm glad I came into this article because it provides a lot of important information. Thank you for sharing this storey with us. top 10 mobile app development companies
ReplyDelete