office-js

Office Add-in Outlook API attach document using displayNewMessageForm method issue

依然范特西╮ 提交于 2019-12-22 00:08:30
问题 I'm working on office Add-in for Outlook. Need to open a new message with a pre-defined attachment. Trying to get an attachment from the current item (message) as below: Office.context.mailbox.item.attachments Here is an output (i get attachment type, id, size and so on): Then I'm trying to attach this file to a new message in Outlook via add-in outlook API, here is an example from Office Developer that I use to attach the file I just get from the other email (like 'forward' functionality):

Infinite redirect loop when issuing a router.navigate with Angular2 Router

我是研究僧i 提交于 2019-12-21 16:58:29
问题 Note Edit with relevant code snippets I have run into an odd issue where I get into a infinite redirect loop when issuing a router.navigate. Setup I use the hash location strategy and the app is used as an Outlook plugin. I have three routing rules "" redirect to "/login" "/login" mapped to LoginViewComponent "/foo" mapped to FooViewComponent The LoginViewComponent has two behaviours: If the user's identity cannot be verified the user will be prompted for credentials If not redirect is issued

How can we force a mailbox item to be persisted to EWS?

北城余情 提交于 2019-12-21 06:15:21
问题 Note: This particular issue has significant impact on our customers, which translates to high business impact with direct consequences on revenue. TL;DR. How can our Office add-in for Outlook, when a user interacts with our add-in while composing an email draft, minimize the amount of time it takes before the EWS GetItem API will return an OK response for the itemId we receive from Office.context.mailbox.item.saveAsync() ? If it turns out that our add-in has no control over when the item will

Clicking inside the task pane content and immediately scrolling over the worksheet causes Excel to become unresponsive

跟風遠走 提交于 2019-12-21 04:58:04
问题 Steps to reproduce: Click anything inside the task pane content. Move the mouse over the worksheet (do not click anything). Scroll with the mouse wheel over the worksheet. Notice that Excel becomes unresponsive. Minimize then restore Excel. Notice that Excel becomes responsive again. I was able to reproduce this with the basic Excel Add-in project template in Visual Studio. I'm currently using the latest build of Excel (16.0.7726.1030). Any workarounds? Thanks! 回答1: I'm able to replicate this

How to send nested attachments?

三世轮回 提交于 2019-12-21 02:36:13
问题 Stuck here writing JS code to send out an email via REST within a custom Outlook add-in. Scenario is following report \ \---- another message (item attachment) \ \------- attachment (file attachment) In words, I am sending a new report message which includes another message as an Item Attachment (that works fine). But now, the problem is that, when sending with another message that has attachments, then this fails. Opening the report which has the other message attached doesn't show the

Worksheet freezes when scrolling on task pane during task execution

主宰稳场 提交于 2019-12-20 10:44:32
问题 We are developping an office Addin with office.js API. A recurrent problem damage our reputation in the store. This problem is that the worksheet in a Excel Addin (office.js) is freezed after scrolling over it. I've written a simple Script Lab snippet code which reproduce the worksheet freezing problem. All the steps to reproduce this are described on it. The snippet is available at : https://gist.github.com/Nassim33/5eaf0bdb4a5b0b1a8db99f58b6de101e 来源: https://stackoverflow.com/questions

(JavaScript API 1.3 for Office) Custom Properties add method

半腔热情 提交于 2019-12-20 07:13:48
问题 Here's a link tho what made me start digging into custom Props again. I can see that my customProperties are 0 so i assume getCount is somewhat working, even though I'm accessing it through items.length and not customProps.getCount() Is this still intended or am i just not doing it right and it's possible doing as in the MS Office Documentation Now the main part of my question, the add method. Whatever i try it crashes and i get an exception. Can i assume add method is still not properly

Let the button open a new window

我怕爱的太早我们不能终老 提交于 2019-12-20 05:41:11
问题 I want to add a button under the tab of my add-in, and clicking on the button should open a URL in a new window or Dialog box. I tried the follows: <Group id="Contoso.Tab1.Group2"> <Label resid="Contoso.Tab1.GroupLabel" /> <Icon> <bt:Image size="16" resid="Contoso.TaskpaneButton3.Icon" /> <bt:Image size="32" resid="Contoso.TaskpaneButton3.Icon" /> <bt:Image size="80" resid="Contoso.TaskpaneButton3.Icon" /> </Icon> <Control xsi:type="Button" id="Contoso.TaskpaneButton3"> <Label resid="Contoso

(JavaScript API 1.3 for Office) Custom Properties GetItemOrNull

百般思念 提交于 2019-12-20 05:21:59
问题 I've created this a couple days ago in which i needed help regarding how to add custom properties to a said document. First of all, I'm running Word 1701(7766.2047). Let's say I have a method In which I return a said custom property. First I'd check if the custom property has been created already. I would do this with a simple getItemOrNullObject(key) and.. If returns null Then simply create it AND return it Else return it It is of my understanding that I need to do a return context.sync()

Cannot load local office.js

混江龙づ霸主 提交于 2019-12-20 04:41:35
问题 As this answer suggested, I want to modify a little bit office.js . So I copied the content of https://appsforoffice.microsoft.com/lib/1/hosted/office.js to local, such that https://localhost:3000/static/office.js shows well the content. Then, I make a very simple file test.html : <html> <head> <!--<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>--> <script type="text/javascript" src="https://localhost:3000/static/office.js"></script> </head> <body> haha <