office-js

Send POST AJAX request from Office Add-In

烈酒焚心 提交于 2019-12-19 09:08:08
问题 I'm trying to send POST Ajax request for third party service from my Outlook Add-in, but no matter what I tried I receiving Error: Access is denied , and status 0 (request never hit the server). Assuming we are running IE9 or 8 behind the outlook I tried old school hacks like https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest. $.ajax({ url: endpoint, data: JSON.stringify({'1':'2'}), // headers: {'X-Requested-With': 'XMLHttpRequest'}, contentType: 'text/plain', type: 'POST',

Office add-in with both taskpane and content?

拟墨画扇 提交于 2019-12-19 05:00:24
问题 I spent all night looking this up and can't find it. Is it possible to have an Excel/Office add-in that has both content and taskpane components? Really, I want a content app, but I want extra options/buttons in the ribbon and taskpane that will trigger different actions/changes in my content app. Whenever I try to add the VersionOverrides xml node to my manifest on a content app, it always fails. None of my buttons show up. All the examples I can find that work have the namespace [...]

Check if Office.js is loaded outside of Office client

喜你入骨 提交于 2019-12-19 03:11:20
问题 If we load a webpage referencing office.js outside Office client, we will get a warning: Office.js is loaded outside of Office client . This information is useful. Does anyone know if there is an API to check that inside my code? Edit 1: I explain a little bit my scenario and why I ask this question. I am making an application with angularjs which can be loaded in a browser as a web page or in Office as an add-in. And I realise that we should not do <body ng-app="myApp"> and angular.bootstrap

How to hook event on sending mail in Office add-in (OWA, Windows Outlook 2016)

这一生的挚爱 提交于 2019-12-18 09:31:11
问题 in (Web and Desktop), I need to observe sending email but it seems to be the API available from office.js does not seem to have any event or method for this functionality. In fact, my requirement is to inject tracking pixels when a user clicks on Send button thereby collecting the outgoing email's conversation id. Any suggestion? 回答1: It is available now. On send feature for Outlook add-ins was implemented with lots of limitation, but at least it's there. Outlook add-in on send code sample is

Can we load Excel file in Office.js Add-in

放肆的年华 提交于 2019-12-18 09:28:27
问题 I am trying to load a Excel file in Excel online. By loading a file I mean lets say I receive an Excel file from a service which I need to show on the current workbook. The file location can be a url or any folder in my site. Excel.run(function (context) { var workbook = context.workbook; //workbook.load or something ? } 回答1: Add-ins are scoped to the document and are intended to extend the functionality of the Office application, not as a mechanism for opening documents themselves. What you

vsto and office web addin in same ribbon tab

允我心安 提交于 2019-12-18 09:13:27
问题 Is it possible to add buttons from two different addins (one office web addin, and the other VSTO addin) in the same custom ribbon tab in office 2016? If yes, how? 回答1: I don't think so, but this should be something you can determine by a quick test. Define a tab/button in VSTO and then define an Add-in Command for the web add-in and use the exact the same name for the tab in the manifest of the web add-in. I suspect you'll get a two tabs with the same name. 来源: https://stackoverflow.com

Dynamic content in Add-in command with ribbon dropdown menu

元气小坏坏 提交于 2019-12-18 06:53:12
问题 Is there a way to display dynamic content in a ribbon dropdown menu with Add-in Commands? I think this is not achievable at the time of the writing. In addition, if the items themselves cannot be dynamic is it possible to have at least dynamic strings for the displayed labels. See Edit: I have created a UserVoice feature request for this here Note: this question is only for the new generation of web add-ins (office.js) not VSTO. 回答1: This is not currently supported but It's on our plan.

Dynamic content in Add-in command with ribbon dropdown menu

ぃ、小莉子 提交于 2019-12-18 06:52:13
问题 Is there a way to display dynamic content in a ribbon dropdown menu with Add-in Commands? I think this is not achievable at the time of the writing. In addition, if the items themselves cannot be dynamic is it possible to have at least dynamic strings for the displayed labels. See Edit: I have created a UserVoice feature request for this here Note: this question is only for the new generation of web add-ins (office.js) not VSTO. 回答1: This is not currently supported but It's on our plan.

Access to Outlook RestAPI from an Outlook web Add-in

半世苍凉 提交于 2019-12-17 21:07:50
问题 I developed an Outlook Web Add-in that is working fine. It's a Taskpane that is available in compose mode of appointments and that collects event's data, adds a few ones and send that all to an API somewhere. What I would like to do now is to subscribe the authenticated user to the Outlook Rest API in order to get notified when the event is deleted. The subscription call should look like this one: POST https://outlook.office.com/api/v2.0/me/subscriptions HTTP/1.1 Content-Type: application

Get custom property set in Outlook Add-In via Microsoft Graph

陌路散爱 提交于 2019-12-17 17:07:52
问题 Let's say I have in my Outlook Add-In (using Office.js) following code running on a compose form of an appointment: const item = Office.context.mailbox.item; item.loadCustomPropertiesAsync((result) => { const props = result.value; const testProp = props.get("my_prop"); console.log("CUSTOM_PROP", testProp); props.set("my_prop", "test_value"); props.saveAsync((saveResult) => console.log("SAVE_CUSTOM_PROP", saveResult)); }); I see, that it actually is saved on the event. And now a bunch of