office-addins

Office.context.document.settings object

纵饮孤独 提交于 2019-12-12 03:33:01
问题 Does anyone know if there is a limit on how many settings can be stored in Office.context.document.settings object? The documentation doesn't seem to mention anything on this matter. Also is there a way to actually see this information being saved somewhere? Where is it physically stored? Thank you. 回答1: If anyone needs it, I think I have found the answer to my question: If you unzip the Word file (rename the file and give it extension .zip instead of .docx and then unzip), you'll see a

Have JS Office Add-in close or exit events for the document?

只愿长相守 提交于 2019-12-12 03:26:25
问题 I'm currently develop a JS Office Add-in, but I could'n find any reference in API Documentation (https://dev.office.com/reference/add-ins/) for an close document or exit document event. I need to suscribe it to show the user warning message about save plugin settings 回答1: There are no events like that in the current version of the Add-in API. 回答2: Try this code: window.addEventListener("beforeunload", function (e) { var confirmationMessage = "\o/"; (e || window.event).returnValue =

Cannot ungroup a PowerPoint SmartArt Shape

家住魔仙堡 提交于 2019-12-12 01:58:39
问题 I try to ungroup a SmartArt shape from code, but it always causes an error: "This member can only be accessed for a group". However, it's working, if I right click on the SmartArt shape, and ungroup it. How can I fix this? My code is: public void CreateSmartArt(PowerPoint.Shapes allShapes) { PowerPoint.Shape smartartShape = allShapes.AddSmartArt(IttPowerPoint.Instance.PowerPointApp.SmartArtLayouts["MyLayOut"], 0f, 0f, width, height); Marshal.ReleaseComObject(smartartShape); smartartShape =

Passing querystring arguments to a Office 365 word add-in

无人久伴 提交于 2019-12-12 01:25:37
问题 Is there any support in the Office API to pass arguments to an office add-in? When a word document is opened in Office 365 by clicking on the document URL https://username-my.sharepoint.com/:w:/r/personal/username_tenantname_onmicrosoft_com/_layouts/15/Doc.aspx?sourcedoc=%7QAF15650B-72D2-447C-BE9C-9201A7F61BA4%7D&file=Document%20158.docx&action=default&mobileredirect=true Can we pass some querystrings in the URL which is accessible in the add-in environment? 回答1: Yes, you can. You could refer

Is it possible to using Custom Properties (JavaScript API 1.3 for Office)

不羁岁月 提交于 2019-12-12 01:14:29
问题 I saw the MS Office js api 1.3 document about custom properties. But I can not read any custom property item from word settings by office js. `Word.run(function (context) { // Create a proxy object for the document. var thisDocument = context.document; var customProperties = thisDocument.properties.customProperties; context.load(customProperties); return context.sync().then(function () { var getcount = customProperties.getCount(); console.log(customProperties.items); return context.sync()

How to capture “Print Tab” click event at the backstage in Outlook 2010 ?

大城市里の小女人 提交于 2019-12-11 19:35:34
问题 I want to capture the click events in "TabPrint" at the backstage of outlook 2010. Followint is what I have done so far I have defined a custom UI in xml as following. I have directed every event to one method (which is OnPrintClick) <?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> <commands> <!-- Mail print related --> <command idMso="FilePrint" onAction="OnPrintClick"/> <command idMso="FilePrintCustomRange"

Outlook AddIn Mobile Issue - not working in mobile whereas same code works for Desktop and web client

半世苍凉 提交于 2019-12-11 16:56:28
问题 I have the bellow error in Microsoft exchange server service, but only on mobiles as same code works for Desktops and web. ERROR MESSAGE: System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse() in \REDMOND\EXCHANGE\BUILD\E15\15.00.0913.015\SOURCES\sources\dev\EwsManagedApi\src\EwsManagedApi\Core

Block add-in for Gmail Accounts in Outlook for Mac

Deadly 提交于 2019-12-11 15:52:46
问题 Is there any way not to support a Gmail account type in Outlook for Mac? Since Gmail accounts support has been announced I need to support also this account types. However, EWS requests does not work for Gmail. I would like to temporary block Gmail users installing my add-in, until I will adjust by backend, and switch to REST. The only idea I have now is to detect accountType in JS and inform user that cannot use this add-in for now. 回答1: Add-in support for Gmail Accounts in Mac Outlook is

SQL Server CE + Addin Read and Write Collision Avoidance?

六眼飞鱼酱① 提交于 2019-12-11 11:18:28
问题 We have an Office Addin that uses Sql CE with the usual DBConnection to a *.sdf in the filesystem ('C:/...etc...'). When we start two copies of the application having the Sql CE-augmented Office Addin (testing what a user might do by mistake) the Sql CE database becomes corrupted and the Office Addin can no longer access its data. It seems like we are missing some basic way of avoiding a seemingly obvious problem. By now everyone knows that Sql CE does not lock its rows allowing the sort of

Office-JS: Excel Host API no longer available under Excel 2016 MSO

本小妞迷上赌 提交于 2019-12-11 08:37:09
问题 I'm currently running Windows 10 with Microsoft Excel 2016 MSO (16.04266.1001) 64-bit. I'm under the impression that that is the version installed via MSI. Over the course of the last few months I've implemented a React-based Excel add-in using the Excel Host APIs. Per the Excel JavaScript API requirement sets document available at the Office Dev Center, that build appears to contain the "ExcelApi 1.1, WordApi 1.1, and common API" requirement sets. As of yesterday, I am no longer able to