office-js

Can't use EWS UpdateItem operation from Outlook add-in

本小妞迷上赌 提交于 2020-01-02 20:09:12
问题 I'm am trying to update a dictionary element in the IPM.Configuration.OWA.UserOptions message using an UpdateItem via an EWS (SOAP) request from an Outlook web add-in with ReadWriteMailbox permissions. However it is failing with the following error in the response: ErrorAccessDenied: Office extension is not allowed to update this type of item. The UpdateItem request I'm using is a fairly straightforward example of updating a message by it's ID and setting the value of an extended property: <

Outlook Add-in command button disabled when composing

拥有回忆 提交于 2020-01-02 07:37:15
问题 My add-in has a MessageComposeCommandSurface ExtensionPoint that adds a button to the ribbon when the user is composing a message. I expected the button to always be enabled when it is visible (e.g. when the user is composing a new message or replying to an existing one), but sometimes it is greyed out/disabled and I'm not sure why. Does anyone know the exact circumstances for when an add-in ribbon button is greyed out/disabled? 回答1: Try to disable some COM add-in and then enable it again. In

Outlook Add-in command button disabled when composing

独自空忆成欢 提交于 2020-01-02 07:37:10
问题 My add-in has a MessageComposeCommandSurface ExtensionPoint that adds a button to the ribbon when the user is composing a message. I expected the button to always be enabled when it is visible (e.g. when the user is composing a new message or replying to an existing one), but sometimes it is greyed out/disabled and I'm not sure why. Does anyone know the exact circumstances for when an add-in ribbon button is greyed out/disabled? 回答1: Try to disable some COM add-in and then enable it again. In

Outlook Add-in command button disabled when composing

孤街浪徒 提交于 2020-01-02 07:37:07
问题 My add-in has a MessageComposeCommandSurface ExtensionPoint that adds a button to the ribbon when the user is composing a message. I expected the button to always be enabled when it is visible (e.g. when the user is composing a new message or replying to an existing one), but sometimes it is greyed out/disabled and I'm not sure why. Does anyone know the exact circumstances for when an add-in ribbon button is greyed out/disabled? 回答1: Try to disable some COM add-in and then enable it again. In

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://outlook.office.com') does not match

拈花ヽ惹草 提交于 2020-01-01 19:32:09
问题 I am developing an add-in for Outlook. I am using the Dialog API. I get an error when using my adding in Outlook for the Web: Failed to execute postMessage on DOMWindow : The target origin provided ( https://outlook.office.com ) does not match the recipient window's origin ( https://myIp:port ) It appears when I call Office.context.ui.messageParent . Anyone faced the same problem and know the fix? 来源: https://stackoverflow.com/questions/49654404/failed-to-execute-postmessage-on-domwindow-the

word - highlight search results without permanently changing document formatting

回眸只為那壹抹淺笑 提交于 2020-01-01 18:18:23
问题 I would like to highlight the search results similarly to what word's native search is doing. In other words, I don't want the search action to have side effects in the document, e.g. by changing the color of the font in the returned text ranges. var searchResults = paragraph.search(searchValue); context.load(searchResults, { select: 'text, font, style' }); 回答1: right now the only way you can achieve your scenario is by traversing the search results collection and change the highlight color

Word insertOoxml method returning Error: Unknown for all input

你说的曾经没有我的故事 提交于 2020-01-01 06:46:10
问题 I have an existing Word Add-In solution that has been working well for a long time that now cannot insert OOXML content into Word documents. Trying to break this down I can't get the insertOoxml method to work under any circumstance. To reproduce: await Word.run(async (context) => { context.document.getSelection().insertOoxml(theOoxml, 'Start'); await context.sync(); }); Where theOoxml can be any valid Ooxml string. The reference example I have been using is: <pkg:package xmlns:pkg="http:/

Adding image to word document

一世执手 提交于 2019-12-31 05:28:04
问题 I have written a below simple word addin to insert an image into word document, but when I execute this code , image does not get added to document. var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAAAsCAMAAACUu/xGAAAAq1BMVEUAAABlZVJlZVKsrJthYU+zs6Grq5ylpZazs6FlZVJfX01lZVJlZVKsrJurq5urq5xlZVKtrZ1lZVJlZVKvr52zs6GysqCoqJeqqpmzs6Grq5xlZVJgYE6zs6Gnp5mrq5yiopRjY1CRkX2rq5yzs6FlZVKRkX2goJKKineRkX2Pj3yrq5yIiHWRkX2RkX2RkX1lZVKRkX2rq5yzs6GoqJdfX02goJKHh3SHh3VrpzVsAAAAMHRSTlMAQIDHx3

Open xml headers not being set with Office Addin

半世苍凉 提交于 2019-12-31 05:11:32
问题 I'm going through this, pretty good, document (http://dev.office.com/docs/add-ins/word/create-better-add-ins-for-word-with-office-open-xml?product=word) to understand OOXML better and to use it in a Word Addin. To test my created OOXM, I use this sample: http://dev.office.com/code-samples-detail/5789. Simple stuff works, but when I try to set the headers of the document it doesn't seem to work. Here's the OOXML snippet: <pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006

1 MB response size limit with outlook web add-ins

Deadly 提交于 2019-12-31 03:51:06
问题 I'm using makeEwsRequestAsync to get the full MIME content of the email. But it looks like response size is capped at 1 MB, per the error message in the response: "ErrorMessage":"Response exceeds 1 MB size limit. Please modify your EWS request.” <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ItemShape> <t:BaseShape>IdOnly</t:BaseShape> <t:AdditionalProperties> <t:FieldURI FieldURI="item:MimeContent"/> </t:AdditionalProperties> </ItemShape> <ItemIds><t:ItemId