office-js

Outlook for Mac add-in with the newly released office.js API

泄露秘密 提交于 2021-02-07 11:05:59
问题 We have an add-in for Office Apps - using the compose form on Outlook appointments in the calendar. Because finally the office.js add-ins support for Outlook for Mac is out as written here, I have some questions: How can I debug the JS in the add-in side pane in Outlook for Mac? Since the behavior is sometimes different to Outlook Web Office.context.mailbox.item.body.setAsync(newBody, { coercionType: Office.CoercionType.Html }, callback) seems to do nothing, only for Office.CoercionType.Text

How do I select a range and change font color of specific words in Outlook web add-ins

房东的猫 提交于 2021-02-07 11:00:11
问题 In Outlook web add-in, I want to select text from email body, keep it as tracked object and then apply styling on it like we do in Word web add-in. In the Word, I do it the following way: //used to store current selected range var selection=null; $scope.getSelectedText = function () { Word.run(function (context) { if (selection) { context.trackedObjects.remove(selection); } selection = context.document.getSelection(); context.trackedObjects.add(selection); context.load(selection, 'text');

How do I select a range and change font color of specific words in Outlook web add-ins

99封情书 提交于 2021-02-07 11:00:03
问题 In Outlook web add-in, I want to select text from email body, keep it as tracked object and then apply styling on it like we do in Word web add-in. In the Word, I do it the following way: //used to store current selected range var selection=null; $scope.getSelectedText = function () { Word.run(function (context) { if (selection) { context.trackedObjects.remove(selection); } selection = context.document.getSelection(); context.trackedObjects.add(selection); context.load(selection, 'text');

Outlook web add-in How to save info to customer properties in EWS

我是研究僧i 提交于 2021-02-07 10:24:09
问题 Using Office.js API we can easily save extra info to the CustomProperties object via customProps.set . The information is specific to the mail item. The is the doc Save to custom properties using office.js Can I achieve the same thing using EWS API? I tried Creating custom extended properties by using the EWS Managed API 2.0 But whatever info saved via this method I cannot retrieve it using Office.js 's customProps.get . The User case is that my add-in will save the email body and its

Outlook web add-in How to save info to customer properties in EWS

百般思念 提交于 2021-02-07 10:23:21
问题 Using Office.js API we can easily save extra info to the CustomProperties object via customProps.set . The information is specific to the mail item. The is the doc Save to custom properties using office.js Can I achieve the same thing using EWS API? I tried Creating custom extended properties by using the EWS Managed API 2.0 But whatever info saved via this method I cannot retrieve it using Office.js 's customProps.get . The User case is that my add-in will save the email body and its

Outlook Add-In on 2016 ProPlus MSI Version (MSO 16.0.4549.1000) gives “Permission Denied” error for displayDialogAsync

做~自己de王妃 提交于 2021-02-04 21:45:48
问题 I'm developing a new Outlook Add-In that uses displayDialogAsync to do authentication. We have several different client verions. It works fine on Outlook for Mac 2016 and Office 365 ProPlus Click-To-Run Version 1808 on Windows. But on Office 2016 ProPlus MSI Version (MSO 16.0.4549.1000) for windows, it gives the error "Permission Denied". Dialog API requirements sets page at https://docs.microsoft.com/en-us/office/dev/add-ins/reference/requirement-sets/dialog-api-requirement-sets says for

Outlook Add-In on 2016 ProPlus MSI Version (MSO 16.0.4549.1000) gives “Permission Denied” error for displayDialogAsync

拟墨画扇 提交于 2021-02-04 21:44:31
问题 I'm developing a new Outlook Add-In that uses displayDialogAsync to do authentication. We have several different client verions. It works fine on Outlook for Mac 2016 and Office 365 ProPlus Click-To-Run Version 1808 on Windows. But on Office 2016 ProPlus MSI Version (MSO 16.0.4549.1000) for windows, it gives the error "Permission Denied". Dialog API requirements sets page at https://docs.microsoft.com/en-us/office/dev/add-ins/reference/requirement-sets/dialog-api-requirement-sets says for

Use Office.js APIs from outside an Office Add in

旧街凉风 提交于 2021-02-04 19:42:40
问题 In the Office.js docs one reads the following about the new ExecuteAsync() method/pattern: "This also allows us to use the same APIs even outside of an Excel add- in. Imagine, for example, that you wanted to call Excel APIs against an > Excel workbook stored in OneDrive, but you wanted to do so from a stand-> alone web application, rather than one running inside Office 2016 for Windows or Office Online. This async model lends itself well to that capability." Nevertheless, I wasn't able to

Long operations crash Office addin (JS)

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 08:09:06
问题 I just created a (JS) Word Add-in and found that long synchronous operations can make it crash. In these cases, the following error is displayed - [ADD-IN ERROR Sorry, we had to restart because this add-in wasn't responding.] The following code is ran on a button click. function scanText() { Word.run(function (context) { var body = context.document.body; context.load(body, 'text'); return context.sync().then(function () { var r = thisOperationCanTakeALongTimeIfDocIsLarge(body.text); }); })

Long operations crash Office addin (JS)

帅比萌擦擦* 提交于 2021-02-04 08:03:08
问题 I just created a (JS) Word Add-in and found that long synchronous operations can make it crash. In these cases, the following error is displayed - [ADD-IN ERROR Sorry, we had to restart because this add-in wasn't responding.] The following code is ran on a button click. function scanText() { Word.run(function (context) { var body = context.document.body; context.load(body, 'text'); return context.sync().then(function () { var r = thisOperationCanTakeALongTimeIfDocIsLarge(body.text); }); })