office-js

Loading Office js addin inside Iframe gives error

◇◆丶佛笑我妖孽 提交于 2021-01-29 09:44:45
问题 I am trying to load my office addin within an Iframe. However the addin gives an error. The browser console log shows the message "Warning: Office.js is loaded outside of Office client". Is there a limitation in displaying an Office js application within an IFrame? I am using Chrome browser The aspx has a js file which loads the Office environment. From the console log I can see that the office environment is loaded. However at the end I get the warning message "Warning: Office.js is loaded

document.contentControls not returning all ContentControls in the document

不羁岁月 提交于 2021-01-29 09:21:40
问题 I have a document with three ContentControl objects that looks like this: Here is the .docx file in its entirety - but essentially the markup of the document body looks like this: <w:body> <w:p w:rsidR="0075044D" w:rsidRDefault="0075044D"> <w:r> <w:t xml:space="preserve">Video provides a powerful way to help you </w:t> </w:r> <w:sdt> <w:sdtPr> <w:alias w:val="cc1"/> <w:tag w:val="prove"/> <w:id w:val="806369342"/> <w:placeholder> <w:docPart w:val="1F3FDE3D075A4E8AADE251C4E318E379"/> </w

How to use refresh token to get new access token in Excel add-in using OfficeJS

心不动则不痛 提交于 2021-01-29 08:47:51
问题 We are using Office js helpers to achieve login screen with OAUTH identity server(3rd-Party OAuth Implicit Provider) and we were able to get id token and access token successfully. Based on our requirement we have to use refresh token to get new access token once it is expired within specified duration. Can you please help on achieving this requirement. 回答1: The office-js-helpers library is deprecated. You can still use it, but Microsoft doesn't support it. For code that shows the use of the

Word add-in Error Code 13004

倾然丶 夕夏残阳落幕 提交于 2021-01-29 06:19:59
问题 Just want to ask for help in this error, seems like there is little documentation about this error. I created a Word add-in that utilizes MS Graph, when I deployed it through Azure App Service and run the add-in in Word. It throws this error: Error code: 13004 Name: Invalid application resource Url provided. Message: Invalid resource Url specified in the manifest. Do note that I am using Azure's default app service URL for my add-in, which is something like https://yourappname.azurewebsite

How can I format text without changing document state in MSWord web add-in API?

我怕爱的太早我们不能终老 提交于 2021-01-29 05:19:03
问题 I'm developing an add-in for MSWord using Microsoft web add-in API. I'd like to underline or highlight some given words, but only in the scope of that session. I don't want to change the document's state. In other words, I don't want to persist the new text formatting when the document is saved. I know how to format text, but the document's state is changed. I have this code at the moment: word_range.font.underline = Word.UnderlineType.wave; I want to achieve a behavior similar to Grammarly

Why does my jQuery getJSON call (within Office.js (Excel js add-in)) return an error?

不打扰是莪最后的温柔 提交于 2021-01-28 08:16:27
问题 This javascript within an Office js add-in always fails when making a get request: function update() { Excel.run(function (ctx) { return ctx.sync() .then(function () { var company = $('#company').val(); var environment = $('#environment').val(); var apiUrl = "https://localhost:44321/api/Country"; var params = "company=" + company + "&environment=" + environment; $.getJSON(apiUrl, params) .done(function (result) { showNotification(result.length); }) .fail(function (xhr, status, error) { /

Share custom ribbon with multiple add-ins (manifests)

旧街凉风 提交于 2021-01-28 08:14:24
问题 I'm not sure if this is a bug or by design but I have two different add-ins ( different manifest files ) that I'm developing but I want them to use the same custom ribbon. Currently, it doesn't seem possible. Expected: The user should be able to do the following: Add the first add-in called "A1" (side-loaded or through store) The Custom ribbon should appear with the name "Awesome Stuff" which has a group of various command buttons that are specific to addin A1. The user should return a few

Force excel to refresh command ribbon (for office add-in) after updating manifest XML

℡╲_俬逩灬. 提交于 2021-01-28 04:50:15
问题 I'm sideloading an office add-in using office.js and an XML manifest located on a share drive. This adds a new ribbon to excel with a few custom command icons once the add-in is loaded. However, after editing the manifest.XML file, say I comment out a command icon from the ribbon, I have not figured out how to force a refresh of the excel ribbon to reflect my changes. I've tried reloading the add-in, re-adding it, restarting excel, updating the manifest version when saving, changing the

Data get render on Desktop Excel using office.js, but on Chrome Office 365 its give an error “There was an error processing the request.”

不想你离开。 提交于 2021-01-28 03:31:19
问题 We are using Office js library to render data on excel. There are more than 2000 rows that works fine on Desktop Excel . But when same API is used on Chrome office 365 it gives error message "There was an error processing the request." Please see attached screenshot. As data get larger Chrome Office excel is not able to render data. Please help us as this is blocker in our application and our production is getting effected. 回答1: There are 2 limitations when interacting with Excel workbook

Data get render on Desktop Excel using office.js, but on Chrome Office 365 its give an error “There was an error processing the request.”

做~自己de王妃 提交于 2021-01-28 02:39:54
问题 We are using Office js library to render data on excel. There are more than 2000 rows that works fine on Desktop Excel . But when same API is used on Chrome office 365 it gives error message "There was an error processing the request." Please see attached screenshot. As data get larger Chrome Office excel is not able to render data. Please help us as this is blocker in our application and our production is getting effected. 回答1: There are 2 limitations when interacting with Excel workbook