Office 365 Macro
Table of Content
Introduction
This macro displays an Office 365 document using the Office 365 platform. To use this macro you need to configure the Office365 accesses in the administration.
This macro can be used either to embed by URL or by searching the document in Office 365 and storing the associated data in the document.
The viewer using is the Office 365 viewer for office documents. For PDFs we cannot use the Office 365 viewer because of a limitation on Office 365 which does not allow to embed their viewer for PDFs. We use the XWiki PDF Viewer if it is installed in XWiki, otherwise we do not display anything.
Macro Syntax
{{office365 /}}
This is the syntax to embed by URL. You just need to copy paste the URL that is in your browser bar when you are viewing or editing an Office 365 document:
{{office365 url="https://xwikidev-my.sharepoint.com/personal/office365_xwikidev_onmicrosoft_com/_layouts/15/WopiFrame.aspx?sourcedoc=%7BD5A1847B-742D-42EB-980F-4964A21E4F05%7D&file=XWikiKeyMessages2017.pptx&action=default" /}}
Limitations
Embedding by URL cannot work for PDF documents. However PDF documents can be embedded by searching them and requires the PDF Viewer macro installed in the Wiki.