office-js

How to use Preview version of office-js Excel API?

≡放荡痞女 提交于 2020-06-18 02:50:15
问题 I want to use Preview features of office-js Excel API (specifically DataValidation). This page says that I should use Beta version of the library and they provide a link but I have no idea what to do with it. What I did so far: I have added the js path to index.html . I copied types from ts file to file in node_modules . But it doesn't seem like a good solution since whenever I update @types/office-js I would also have to copy source again... 回答1: in order to use preview Api you only need:

Pinned Outlook web addin: ItemChanged event stops arriving

微笑、不失礼 提交于 2020-06-13 09:10:49
问题 We have a user for whom our pinned addin stops receiving ItemChanged event after a while (Outlook desktop only). We can always reproduce this situation in Outlook and there are no errors in the JavaScript log. What could be happening? Outlook stops firing events? Office.js loosing our event handler? How can we debug this? We can attach to the process using the Edge Dev tool. Your help would be greatly appreciated. 回答1: Thanks for reporting this issue regarding the ItemChanged Event. This is a

How to open new Word docx document in word Add-in

限于喜欢 提交于 2020-06-10 02:04:38
问题 I have developed a word add-in using word javascript api. My Document .docx file is on server and i need to open that .docx document as a new word document on a button click in add-in. Please guide me how i can open new document in word add-in. Thanks. 回答1: There is a new method we are adding to the API that you can actually use to achieve this. Notice that is in preview, which means will be in production in a couple of months. You need latest Office version plus reference our preview office

Office.context.document.customXmlParts is undefined

对着背影说爱祢 提交于 2020-06-01 06:05:23
问题 I'm working on an Excel addin using Office JS, in a taskpane, I call Office.context.document.customXmlParts.getByNamespaceAsync, but it throws exception 'TypeError: Cannot read property 'getByNamespaceAsync' of undefined', namely Office.context.document.customXmlParts is undefined The office-js version is 1.0.52 The below way to get the customXmlParts works: return await Excel.run(async ctx => { const workbook = ctx.workbook; workbook.load("customXmlParts"); await ctx.sync(); const items =

Office.context.document.customXmlParts is undefined

守給你的承諾、 提交于 2020-06-01 06:04:44
问题 I'm working on an Excel addin using Office JS, in a taskpane, I call Office.context.document.customXmlParts.getByNamespaceAsync, but it throws exception 'TypeError: Cannot read property 'getByNamespaceAsync' of undefined', namely Office.context.document.customXmlParts is undefined The office-js version is 1.0.52 The below way to get the customXmlParts works: return await Excel.run(async ctx => { const workbook = ctx.workbook; workbook.load("customXmlParts"); await ctx.sync(); const items =

ContextMenu in Word

对着背影说爱祢 提交于 2020-06-01 05:53:05
问题 Creating a manifest for a Word Add-in. I am trying to put TWO menu items on the ContextMenuText. I am following the guidance here: https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/control#menu-dropdown-button-controls. Here is where I get this understanding: When used with a PrimaryCommandSurface or ContextMenu extension point, the menu control defines: A root-level menu item. A list of submenu items . Everything I read says this is possible, and when I run NPM VALIDATE,

Office JS: Problems when Addin is executed in multiple Excel instances

荒凉一梦 提交于 2020-05-16 06:31:09
问题 I have problems executing an office addin in multiple Excel instances. One stops running when both are executed hat the same time. I did 2 quick ScriptLab samples, where you can reproduce some issues (I pasted them). One contains an UDF-Function, just register it in ScriptLab. The other on is a sample which produces one of my problems. First register the UDF, than before using the second part, create 2 workbooks with each having 100 worksheets that contain the following function (depending on

Do you need an on premise exchange server to call makeEwsRequestAsync?

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-14 09:10:10
问题 I am trying to create an add in for outlook using office.js. For a week now, I have been receiving accessRestricted error from using makeEwsRequestAsync. When I read the documentation again, it says I have to explicitly set oauthentication to true in the exchange server. When I check to see how to set oauthentication to true, at the top of the page, I see the command only exist in on-premise exchange server. I bought an online exchange server, and the command listed does not work in my

Outlook addin On Send on dektop not firing

随声附和 提交于 2020-04-11 18:34:42
问题 I have been building an office add-in for Outlook. I have a taskpane, that works fine, and yesterday, I added "on send" function. It works well on web, but it doesn't work on desktop. Mails are just sent without any notification message. According to the documentation, it should work on desktop now? "The on-send feature is currently supported for Outlook on the web in Exchange Online (Office 365), Exchange 2016 on-premises (Cumulative Update 6 or later), and Exchange 2019 on-premises

Outlook addin On Send on dektop not firing

跟風遠走 提交于 2020-04-11 18:33:58
问题 I have been building an office add-in for Outlook. I have a taskpane, that works fine, and yesterday, I added "on send" function. It works well on web, but it doesn't work on desktop. Mails are just sent without any notification message. According to the documentation, it should work on desktop now? "The on-send feature is currently supported for Outlook on the web in Exchange Online (Office 365), Exchange 2016 on-premises (Cumulative Update 6 or later), and Exchange 2019 on-premises