office-js

How to define Excel using microsoft office-js in Angular 6

流过昼夜 提交于 2019-12-13 06:31:37
问题 I am following this site to integrate office js On declaring like this: import * as Excel from '@microsoft/office-js/excel' It's showing compile time error: Cannot find module '@microsoft/office-js/excel' On declaring like this: declare var Excel: any It's showing run time error: ERROR ReferenceError: Excel is not defined Please suggest how to declare it. I need to use it like this: Excel.run(session, (context){ ... }); 回答1: Install office type definition: npm install --save @types/office-js

How to get 'Commands' button working in Office Addins?

南楼画角 提交于 2019-12-13 04:12:19
问题 I have issue that any function I use for button does not work + I don't know how to debug Office Commands. Excel Version 1904 (build 11527.20004) When I use F12 debugger and attach to the IE process for my addin (task pane), then when I click the button I'll get unhandled exception and prompt to attach debugger, If I do so with my VS 2017, I will get this: Unhandled exception at line 18, column 27179 in https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js 0x800a01b6 - JavaScript

401 Unauthorized when trying to send emails from EWS Managed API

蓝咒 提交于 2019-12-13 03:47:55
问题 Ok so I am developing an addin which must automatically send emails to others. I know that office-js does not have permissions to do so and I have started using EWS Managed API. I have implemented SSO token and I get it with: Office.context.auth.getAccessTokenAsync() After I get the token I make a request call to my server where I have my EWS Managed API and try to send an email with the folowing code: ExchangeService exService = new ExchangeService(); exService.Url = new Uri(ewsUrl);

Outlook Add-in for Android :Exception trying to access userProfile. Elevated Permission required to access protected members of Javascript API-Office

霸气de小男生 提交于 2019-12-13 03:46:48
问题 We have noticed that when we try to access Office.context.mailbox.userProfile in order to get the Logged in user email address and display name, we are getting an exception and the app doesn't load. The Add-in works properly on : Web client Windows and Mac Desktop platform app Windows and Mac iOS Outlook Mobile app The office documentation mentions, userProfile is accessible for [ API set: Mailbox 1.0 ] https://docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set

Run add-in without showing taskpane?

江枫思渺然 提交于 2019-12-13 03:24:24
问题 I have an add-in working (on Word for Mac). All functionality runs in the background, so there is no interaction with the UI exposed in the taskpane. However, if I close the taskpane, the add-in functionality is removed. Is there a way to remove the taskpane so that the add-in functionality will run in the background? Currently, the taskpane is just a waste of screen space... Thanks for any help! 回答1: There's no way of doing that unfortunately. Suresh's answer is referring to Function Files

Content type fields+customXMLParts+ document custom properties

你。 提交于 2019-12-13 03:07:34
问题 I have associated my custom content type with my document library in sharepoint, and each content type is connected with a template. Is there a way that I can access content fields values with 'office js' so that I can update my content fields values by code? I tried 'CSOM', I can access the fields and can edit, however when I save I got error message saying the document is in use or is locked by another person. Note: with 'context.document.properties' I can only access the buildin properties

New Outlook API (2015) mail add-in send event

喜你入骨 提交于 2019-12-13 02:00:38
问题 Does the new Microsoft Outlook API, which enables development of Outlook addins for cross platform, have the ability to trigger an event off the user clicking the send button? I currently have an Outlook VSTO addin that uses the Application.ItemSend event to check an email for specific content and present the user with a popup asking them if they still want to send or not. This is only compatible with Outlook 2007-16 on Windows though, and I was hoping the new API might enable me to build

OfficeJS Manifest Type MailApp - can not use WebApplicationInfo

独自空忆成欢 提交于 2019-12-13 01:20:20
问题 I have followed the steps according to doc. The application is registered and I have gained the guid which I want to use in WebApplicationInfo to get the OAuth token. Unfortunately using office addin manifest validator (npm -i -g validate-office-addin) I am getting the error XML Schema Violation: Your manifest does not adhere to the current set of XML schema definitions for Office Add-in manifests. (link: https://aka.ms/add-in-manifest-schema-violation) - Details: The element 'OfficeApp' in

Worksheet function for division of real numbers (ie, /)

心不动则不痛 提交于 2019-12-12 19:22:31
问题 I have not found division of real numbers (ie, / ) in worksheet functions. As a consequence, to evaluate =SUM(2,SUM(30,40)/3) , we cannot use one expression ctx.workbook.functions.sum(1,ctx.workbook.functions.sum(30,40)/3) ; we have to do ctx.sync two times: function test () { Excel.run(function (ctx) { var result = ctx.workbook.functions.sum(30,40); var result2; result.load(); return ctx.sync() .then(function () { result2 = ctx.workbook.functions.sum(1,result.value/3); result2.load(); })

How to set default browser for an add-in

自古美人都是妖i 提交于 2019-12-12 19:16:11
问题 I am trying to set default browser for the add-in I am using to chrome, but by default it takes IE always. How do I change this 回答1: I assume you are talking about a scenario where your add-in generates a new browser window/popup. On Windows, this will always be Internet Explorer. Keep in mind that for all Office desktop variants, add-ins are hosted within an embedded browser instance. For Windows machines, this is an embedded Internet Explorer instance. For Mac machines, it uses an embedded