office-js

User's mailbox API returning different emails when on OWA vs desktop client, or pre/post SSO sign in

拈花ヽ惹草 提交于 2021-01-01 06:43:34
问题 In our 365 add-in, we're using the Office.context.mailbox.userProfile.emailAddress API to get the user's email address, for authentication/data retrieval with our own backend (e.g. get the user's data). It returns inconsistent results depending on the user's 365 setup. Some users who have SSO setup with their org will have a completely different email returned from that API after they go through the OAuth process - meaning that it will return something like jon.smith@domain.com pre-OAuth,

Uploading a file crashes Desktop App Web Viewer

馋奶兔 提交于 2020-12-30 04:19:45
问题 We are facing problems while uploading files via our o365 addin on Windows. In the compose mode, we launch a iframed app via a ribbon button. This iframed app which launches in a Desktop App Web Viewer allows users to upload files. The problem is that as soon as the users are done selecting the files they want to upload, the Desktop App Web Viewer crashes and we are back to the compose view. This happens intermittently but is frequent enough to be problematic. I looked at some Office JS

Uploading a file crashes Desktop App Web Viewer

痞子三分冷 提交于 2020-12-30 04:19:31
问题 We are facing problems while uploading files via our o365 addin on Windows. In the compose mode, we launch a iframed app via a ribbon button. This iframed app which launches in a Desktop App Web Viewer allows users to upload files. The problem is that as soon as the users are done selecting the files they want to upload, the Desktop App Web Viewer crashes and we are back to the compose view. This happens intermittently but is frequent enough to be problematic. I looked at some Office JS

How to configure Office-js excel react add-in to use react-router-dom or alternative solutions?

北城余情 提交于 2020-12-26 12:50:49
问题 So I'm trying to set up an Office-js excel add-in using react (using the yeoman office-js generator found here https://github.com/OfficeDev/generator-office) and am running into issues configuring the add-in to use multiple routes. Doesn't look like traditional React routing works right out of the box (currently trying to use react-router-dom). Anybody know how I'd go about doing this? In particular, looking to see how I should configure some sort of routes, webpack.config.js, and the

How to configure Office-js excel react add-in to use react-router-dom or alternative solutions?

落花浮王杯 提交于 2020-12-26 12:48:01
问题 So I'm trying to set up an Office-js excel add-in using react (using the yeoman office-js generator found here https://github.com/OfficeDev/generator-office) and am running into issues configuring the add-in to use multiple routes. Doesn't look like traditional React routing works right out of the box (currently trying to use react-router-dom). Anybody know how I'd go about doing this? In particular, looking to see how I should configure some sort of routes, webpack.config.js, and the

Microsoft Word JavaScript API - event handler for text selection in document

Deadly 提交于 2020-12-06 05:35:09
问题 I read JavaScript API for Office and I couldn't find a handler to notify when user select a text in the word document. I am aware that we can copy the selected/highlighted text from document as follow: Word.run(function(context) { let body = context.document.body; // ask for the user selected text let range = context.document.getSelection(); }); This approach is not a registered callback or an event. With this approach I have to request update or to check if user selected anything. Is there

Microsoft Word JavaScript API - event handler for text selection in document

十年热恋 提交于 2020-12-06 05:34:10
问题 I read JavaScript API for Office and I couldn't find a handler to notify when user select a text in the word document. I am aware that we can copy the selected/highlighted text from document as follow: Word.run(function(context) { let body = context.document.body; // ask for the user selected text let range = context.document.getSelection(); }); This approach is not a registered callback or an event. With this approach I have to request update or to check if user selected anything. Is there