office-js

how to implement OAuth connection to 3rd party from Outlook Mobile App addin

点点圈 提交于 2019-12-11 05:39:47
问题 we tried opening a window, office dialogAsyncApi but they didnt work. the call never returned to the add-in running in outlook mobile app on both android & ios. what is the preferred approach? 回答1: Below are some resources on using the dialog API in Office.js. They should be supported in Outlook Mobile on iOS and Android. This is preferrable to window.open . Dialog API in Office Add-ins Dialog API doc 来源: https://stackoverflow.com/questions/53226711/how-to-implement-oauth-connection-to-3rd

How to use ranges saved to React state - Microsoft Word javascript API?

我是研究僧i 提交于 2019-12-11 05:22:13
问题 I am using the Microsoft Word Javascript API. I have used the .search() function to retrieve an array of ranges and then have saved them to state.definitions in my App.js React component state. This part works. When I try to print out the state using console.log(JSON.stringify(this.state.definitions)), I see the ranges that I just saved. In a separate function, I want to retrieve those ranges and highlight them in a new color. This part does not work. I don't get any errors, but I don't see

Can I create a workbook with Excel javascript add in?

浪尽此生 提交于 2019-12-11 05:06:21
问题 Is there any equivalent for Excel javascript add-ins to do what we can do in Word with context.application.createDocument() ? I don't see any create method in Excel Application object. 回答1: The API for Excel is now under previewing, you can try to call through this way: context.application.createWorkbook(base64); 回答2: As @MSFT-Jipyua mentioned, createWorkbook() is currently in "Preview" as part of v1.8. As it is in preview Preview (1.7 was just released in May and is rolling out to clients

How to set custom settings for worksheet using Excel javascript API?

我是研究僧i 提交于 2019-12-11 05:00:02
问题 I can set settings for whole workbook like here: Office.context.document.settings.set("myKey", JSON.stringify(myValues)); Is there way to do the same but for specific worksheet ? 回答1: You should retrieve the Worksheet.id property and include it as part of each key you set. (Worksheet names are also exposed to the API, but the user can change them, so id is recommended here.) -Michael (PM for Office add-ins) 来源: https://stackoverflow.com/questions/37654909/how-to-set-custom-settings-for

Open a document in Office via HTTPS

耗尽温柔 提交于 2019-12-11 04:54:39
问题 I want to integrate a web based document management app with some office suite (preferrably Office 360) I want to open Excel and Word documents from the browser and they should get saved back to the server via HTTPS. The "open with" feature of browsers already allows for the opening, but how to add save featues? Do I have to write an add-in or is there some Office 360 API that allows integration of "Office online" right into my wrb app? Are there some other (JS based?) office suites that

Width of contextual menu

时光毁灭记忆、已成空白 提交于 2019-12-11 04:54:14
问题 I am trying to use the command bar of ng-office-ui-fabric, and modify the width of uif-contextextual-menu-item . Here is a code <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/2.6.3/css/fabric.min.css" /> <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/2.6.3/css

Highlight bindings in a document

耗尽温柔 提交于 2019-12-11 04:46:25
问题 I have an Office Add-in using JavaScript API for Office 1.1. I am trying to highlight bindings in a Word document and bindings to cells in Excel documents so the user can easily recognize them. I see the API allows formatting of TableBindings using setFormatsAsync but mine are Matrix and Text. I don't use Table type because it adds a header row and the total row messes up my logic. Is there a way to format or highlight the bindings? I will prefer this to be temporary - similar to the way the

Set constant size of dialog box using Dialog API for Office Online

瘦欲@ 提交于 2019-12-11 04:42:33
问题 Is there a way to set a constant size for the dialog box that is opened using the Dialog API, by using the min-width/max-width CSS properties or otherwise? The API only allows setting the width and height percentage, which makes the box look inconsistent when resizing or using different resolutions (30% of 1024px is a skinny window, but looks fine for 1920 for example). I noticed that the "Office Add-ins" store pop up seems to have a min-width/max-width, so that when resizing it maintains a

Protect/unprotect a Word document

空扰寡人 提交于 2019-12-11 04:25:53
问题 Is there any way to protect/unprotected a Word document by password programmatically using office.js ? I have checked the API documentation (https://github.com/OfficeDev/office-js-docs/blob/WordJs_1.4_OpenSpec/reference/word/body.md#getrangerangelocation-string) of OfficeJS. But do not get any clue. Any types of tip/help is welcome ! 回答1: Unfortunately that's not possible to achieve with the API. Please share this request in our user voice channel. 来源: https://stackoverflow.com/questions

Office.EventType.DocumentSelectionChanged(in Excel) not working in all web browsers

拈花ヽ惹草 提交于 2019-12-11 03:47:12
问题 I am trying to add DocumentSelectionChanged event handle in Excel online document (tested in all browsers). Creating this event is failing from last 15 days. Please help me here P.S: Same event working fine in Excel 2013 desktop environment Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, function(eventArgs) { console.log(eventArgs); }, function(asyncResult) { console.log(asyncResult); }); OSF.DDA.AsyncResult {value: undefined, status: "failed", error: OSF