office-js

How to get working Dialog API of OfficeJS API with Outlook 2016 desktop client

◇◆丶佛笑我妖孽 提交于 2019-12-10 06:28:55
问题 I developed a outlook add-in which using OfficeJS API and want to implement OAuth within app, also API Documnetation says Outlook 2016(Desktop) supports requirements set 1.1, 1.2, 1.3 & 1.4 but in my case it remains silent not even throws an error. While running working dialog api sample for word add-in i am getting JavaScript run-time error: Unable to get property 'displayDialogAsync' of undefined or null reference . I am using Microsoft Office Professional Plus 2016. Code I wrote to launch

OnSend fired twice after attachment reminder

被刻印的时光 ゝ 提交于 2019-12-10 02:52:19
问题 In Outlook Web Add-In, I'm trying to intercept OnSend event which is triggered when sending an email. I used this example in GitHub which is working fine. If I include the word "attachment" in the email body and I click Send button, OnSend event is fired once and a pop-up modal window shows up with this message: Attachment reminder You may have forgotten to attach a file. with Send and Don't send buttons. If click Send , OnSend event get fired twice: 2 times after clicking Send button within

How to check an Outlook custom property is available via Microsoft Graph

亡梦爱人 提交于 2019-12-10 00:02:54
问题 I added a custom property to an Event using an office.js add-in. I tried to get that custom property's value using https://graph.microsoft.com/v1.0/me/events/AQMkADU2OWFjYTF..AAAA==?singleValueExtendedProperties($filter=id eq 'String 00020329-0000-0000-C000-000000000046 myCusPropId ') but it is return an error: { "error": { "code": "ErrorInvalidProperty", "message": "PropertyId values may only be in one of the following formats: 'MapiPropertyType namespaceGuid Name propertyName',

Outlook Add In - Side Loaded Custom Add In disappears after I close the Windows Store from Outlook

假装没事ソ 提交于 2019-12-09 23:45:57
问题 Very perplexing I am developing an Outlook Add-In to open a pane from a button on the compose email window. I have loaded into a test account on outlook.com, and it works perfectly. When I go to side-load the add into Outlook Desktop (by loading the manifest XML directly by file), the system accepts it. However, when I close the Microsoft Add-In Store window, the add-in is not in the compose email, AND when I go manage my add-ins, the manifest I loaded is not there. The add-in is designed to

Inserting OoXml into word throwing Error: Unknown

拟墨画扇 提交于 2019-12-09 19:26:03
问题 I've been attempting to insert OOXML into the body content of word documents via the office-js insertOoXML() method. I've even tried the simplest of implementations (thinking I was doing something incorrect when attempting to replace fieldCodes in the XML itself) and all result in this Error: unknown response after saying its "inserting": Error: unknown at new r (word-web-16.00.js:21) at i.c.processRequestExecutorResponseMessage (word-web-16.00.js:21) at word-web-16.00.js:21 To reproduce -

Trusted way to get the host origin of an Office add-in

纵饮孤独 提交于 2019-12-09 03:45:05
问题 I'm currently implementing an Outlook Add-in. It shows the user a pop-up window whenever the user is about to complete a potentially dangerous action, to protect against clickjacking attacks. I was hoping not to have to show the user the pop-up window every time they use the add-in -- only the first time they use it from a new host origin. Is there a way to get the verified host origin of an Office add-in, so I can remember that the user trusts it for next time? Right now I'm listening for

Load document from local filesystem to Office online

余生颓废 提交于 2019-12-08 20:14:49
I would like to load/save a file directly from the local filesystem in Word online (without uploading it to onedrive). Since this is not part of the default functionality I am trying to determine if this would be possible with an addin. The loading part: The Document object gives access to body load and save Methods however the documentation is unclear (to me) for load: Fills the proxy object created in JavaScript layer with property and object values specified in the parameter. It seems there are options available like insertFileFromBase64 and insertOoxml but unclear if those are only in

How to achieve Freeze Pane in excel using office js api?

女生的网名这么多〃 提交于 2019-12-08 13:56:27
Our add-in create new sheet with ~300 columns. Users want the ability to freeze pane on first 2 columns, so when they move to the right, they still can see the context. Any ideas on how to achieve this? This feature is now available in Beta. Please switch to CDN to access this. https://appsforoffice.microsoft.com/lib/beta/hosted/office.js Sample: async function freezeColumns() { await Excel.run(async (context) => { const sheet = context.workbook.worksheets.getItem("Sample"); // Freeze the first two columns in the worksheet. sheet.freezePanes.freezeColumns(2); //// Similarly, Freeze the top two

Outlook web add-in autentication failure for on-premise exchange

杀马特。学长 韩版系。学妹 提交于 2019-12-08 13:27:29
问题 I use Office.js 's getCallbackTokenAsync to load the token to pass to the backend. In the backend, I use EWS to retrieve the email data. Here is how I perform the authentication. ExchangeService service = new ExchangeService(); service.Url = new Uri(ewsUrl); //retrieved from getCallbackTokenAsync service.Credentials = new OAuthCredentials(ewsToken);// retrieved from getCallbackTokenAsync It works well in exchange online enviroment. However when tested in on-premise exchange server, I got this

Two-way communication between VSTO add-in and a Task Pane app (JS/HTML)

五迷三道 提交于 2019-12-08 12:52:43
问题 Is it possible to have a VSTO add-in and a JS/HTML based Task Pane app talk to each other when running inside desktop Office application? The goal would be to bridge capabilities not yet present (or never will be present) in the x-platform Office APIs using VSTO. 回答1: As Evgene mentioned, there is no out-of-the-box functionality for this (though the topic has certainly come up in internal discussions, so I would be very curious to hear your scenario, and particularly how you would handle the