office-js

How to enure the latest JS code is loaded by Task Pane add-in?

一个人想着一个人 提交于 2019-12-08 08:12:55
问题 I am running into an issue with my Task Pane add-in when running it in desktop Excel 2016 on the Mac (OSX). I have deployed the first version of the add-in to a web server and successfully inserted a reference to the add-in's manifest into an Excel workbook and can see it working on the client box (the Mac). Then I made a few changes to some JavaScript code in my add-in's "foo.js" and then deployed those changes to the web server. Now when I open the workbook I do not see the behavior I

Word Add-in Get full Document text?

我与影子孤独终老i 提交于 2019-12-08 07:31:14
问题 I'm writing an office-addin using the Yeoman Office generator, based on these instructions. The default add-in has a function which will get the text selected in your word document. I'm trying to modify the function to instead get the full-text of the document. My function code is as follows: function getDataFromDoc(){ Office.context.document.getFileAsync(Office.CoercionType.Text, function(result){ jQuery('#get-data-from-selection').click(getDataFromSelection); if (result.status === Office

Outlook Add-In API does not fire the ItemChange event consistently on Firefox/Chrome

主宰稳场 提交于 2019-12-08 07:12:54
问题 We have enabled task pane pinning in our manifest for an Outlook add-in and noticed that the pinning support is now available in the Outlook Office online in addition to the Windows Outlook 2016 client. However, the ItemChange event does not seem to be triggered consistently when switching mail items (I am unable to discern any rhyme or reason on when it gets fired). We are listening for this event using the addHandlerAsync method. Is this a bug? 回答1: I was experiencing the same issue.

OWA: Dialog API support

蓝咒 提交于 2019-12-08 07:09:02
问题 We use a dialog in our Outlook add-in for authentication. We have logic in our add-in that first checks for dialog API support, then checks if the add-in is framed - in which case it pops a new window for authentication instead. Recently the dialog API lit up for OWA, and has caused us a couple issues. We fixed some previous issues relating to the order in which we performed authentication (we use ADAL.js ) and initializing Office. However, once we were past those, it doesn't appear the

Office.js mail object properties missing in TypeScript

走远了吗. 提交于 2019-12-08 06:46:22
问题 I've got an Outlook web add-in project based on the React and TypeScript scaffolding generated by the Yeoman Office Add-in Generator. However, the intellisense (I'm using Webstorm) appears to be missing almost all of the properties and methods for the Office.context.mailbox.item object. e.g. Only body and dateTimeCreated, not even subject and a bunch of others! I'm not sure if this is an issue with the files generated by Yeoman, or something else (I'm very new to React). Below is a screenshot

Office.context.mailbox.item.to.getAsync updates TO field with partial data

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 05:37:53
问题 I start typing in Outlook TO field and at the same moment query every 1s TO field from the installed Add-in. While I'm still typing I expect to receive an empty array but Outlook (office-js SDK): Returns data with empty emailAddress and typed displayName Creates new address with partially typed displayName and incorrect emailAddress generated from typed data. I can handle the first issue but how to prevent the second one? Executed code: Office.cast.item.toItemCompose(Office.context.mailbox

Word JS api Access Denied (ContentControl.select, Body.getHtml)

末鹿安然 提交于 2019-12-08 05:14:06
问题 I'm trying to select content control through js select() function - docs - but I'm always getting Access Denied error: Error: { "name": "OfficeExtension.Error", "code": "AccessDenied", "message": "AccessDenied", "traceMessages": [], "debugInfo": { "errorLocation":"ContentControl.select" }, "stack":"AccessDenied: AccessDenied\n at Anonymous function (https://appsforoffice.microsoft.com/lib/1.1/hosted/word-win32-16.00.js:19:150094)\n at yi (https://appsforoffice.microsoft.com/lib/1.1/hosted

Auto-open does not work for people who have not signed in in browser

僤鯓⒐⒋嵵緔 提交于 2019-12-08 05:09:43
问题 I want to share a document online by a URL with some colleagues. When they click the URL and view the document online, I want a task-pane add-in to be automatically opened. I used Office-OOXML-EmbedAddin to create such a file with Script Lab auto-opened, then I put the file (view-only) on my OneDrive: https://1drv.ms/x/s!AmAcI5jpNEmng1NhS0xbIMcUnUNZ However, our tests show that, for people who have not signed in with Microsoft Account in their browser, the auto-open does NOT work, though they

Outlook 365 addin throws 401 unauthorized error on android outlook mobile app

落花浮王杯 提交于 2019-12-08 05:07:36
问题 I am developing Outlook Add-In that will run over all modern browsers, android and iOS. I am using Managed EWS API to fetch the email and its attachment by passing ewsUrl , itemId and ewsToken in OAuthCredentials class which is my remote service. I am getting ewsToken by using Office.js getCallbackTokenAsync method from UI and passing all this information to my remote service to use the Managed EWS API to fetch email from exchange server. For browsers it works fine but when we use Outlook

Getting attachments from Exchange Managed API using ASP.NET Core

巧了我就是萌 提交于 2019-12-08 04:08:47
问题 I am in the process of building an Outlook Add-In that authenticates to an external API that is also in my possession. For one of my functions, I am sending a list of attachment IDs from the add-in to the API. I can then use these IDs to get the corresponding attachments from Microsoft's Exchange Managed API. The issue is that because I'm using .NET Core, the recommended libraries are lacking the necessary functionality needed to access the attachments. Here is some code that I am trying to