office-js

Prevent clickjacking using Office.js

不羁的心 提交于 2019-12-12 03:53:15
问题 The documentation at https://github.com/OfficeDev/office-js-docs/blob/master/docs/develop/privacy-and-security.md#tips-to-prevent-clickjacking lists a bunch of ways to help prevent clickjacking, by having the user confirm before performing potentially dangerous actions. I was wondering if it would be just as safe to not render any UI on the page at all, until Office.initialize is called? Or is there a way for an attacker to iframe my add-in on their page and somehow replace the Office SDK

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 =

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()

Office.js throws exception when tried to read cell address if Excel is kept Open for 20-30 min and then try to read cells value

故事扮演 提交于 2019-12-11 23:45:24
问题 I am using office.js i am trying to read the cell value by passing the address of cell to a function. it works all fine but sometime it just throws exception and exception messages are too general that you do not know what the issue is. look at the function below its all good but some time i get error when ctx is tried to sync at return ctx.sync().then(function () { public getDataAtRange(rangeAddress: string): JQueryPromise<any[]> { let defer = $.Deferred(); if (rangeAddress !== null) { Excel

Online Excel Add In on workbook re-opening

夙愿已清 提交于 2019-12-11 22:54:01
问题 We have a Task Pane Add-In for Excel Online. Installing the Add-In from the Office Store open the sidebar with our IFRAME as expected. But when we close the tab with the spreadsheet and reopen the same workbook (for edit or not) later, only an icon appears on the right border. Sometimes this is our Add-In icon, sometimes it is a neutral icon (mouse over Office-Addin). Clicking on the icon does not show the sidebar (although it has been loaded). Pressing the arrow above the icon(s) does not

Microsoft office store acquisitions graph not updated

南笙酒味 提交于 2019-12-11 22:33:39
问题 In the microsoft office store partner center the "Analyze -> Acquisitions" graph for my outlook add-in is not updated for the last 10 days. It looks like it correlates with the day where I uploaded a new version of the add-in which was rejected by the seller dashboard team. But the old version is still available in the office store, so I would expect to see acquisitions for the add-in. The add-in is named Plandisc, and I have been running e-mail marketing campaigns this week, so I would

How to schedule office.js add-in to run at specific time on Sharepoint 2019

我是研究僧i 提交于 2019-12-11 17:12:11
问题 I need to run an excel-macro (copies and pastes w/in same workbook) on the same day each month indefinitely. The workbook resides on SharePoint 2019 and I do not have any external machines to run a cron. From my understanding I can use/script an office.js API that will allow me to run macros on SharePoints web-based excel GUI. However, I do not understand/can't find any information on how to automate/schedule the macro to run at a specific time. I did see this In JavaScript, how can I have a

Implementing (Fabric UI) React in an (Office Web Add-In) ASP.net project

為{幸葍}努か 提交于 2019-12-11 16:38:57
问题 Context: For a client we would like to develop an Office Web add-in with Microsoft's Fabric UI. The Office Web add-ins function as webpages that can be displayed within Office Applications. Interaction with the Office content (document/workbook/sheets) is done through the Javascript API (Office.js). In order to save time and ensure that the add-in has the same look and feel as the Office Application, Fabric UI is used. Fabric UI consists of a bootstrap like package and some ready to use