Office.context.mailbox.item.body.getAsync() on mac misses certain styles, such as bullet points.
Details:
Insert the following bullet in message body using the client UI:
• Testing bullets
Call getAsync and receive the following:
<p class=MsoListParagraph style='text-indent:0in'>Testing bullets</p>
Call setAsync and expect the bullet to disappear:
Testing bullets
See above
I understand the documentation indicates:
Body.getAsync and Body.setAsync methods are not idempotent.
But the bullet is inserted from the Outlook UI itself and I expect the API to fully support it.
Stackoverflow question here:
https://stackoverflow.com/questions/50451394/outlook-addin-api-body-getasync-missing-some-styles-on-mac
@mlafleur Thanks for tagging the issue and responding on stackoverflow.
For the Outlook team, is there an alternative way to get/set the body HTML (from a javascript addin) during message compose that we can look into, before this issue is investigated/resolved?
Thanks.
Thanks for raising it. We are working on towards fixing it.
@macOutlookExtensibility Hi, is there an update on this issue or ETA for the fix? Thanks.
@macOutlookExtensibility @exextoc Any updates on the fix progress? We have many clients affected by this issue. Thanks.
@macOutlookExtensibility @exextoc Any updates ?
As a workaround you can save it Exchange:
Office.context.mailbox.item.saveAsync()
and then get the body via
Office.context.mailbox.makeEwsRequestAsync()
;(
@macOutlookExtensibility Has this issue been fixed? Thanks.
The issue is still reproducible as of today.
@ElizabethSamuel-MSFT @macOutlookExtensibility Is there an update on this issue? There are other similar issues reported (e.g. https://github.com/OfficeDev/office-js/issues/402), and it impacts our add-in users on Mac.
Issue still present....
As a workaround you can save it Exchange:
Office.context.mailbox.item.saveAsync()and then get the body via
Office.context.mailbox.makeEwsRequestAsync()
Unfortunately it will not work for all cases. Per docs, it may take some time until ID can be used in API if outlook is in caching mode (afaik it is a default for Outlook desktop for Windows). Because of this - you can never be sure if you will receive current body or body from last draft save.
I am no longer working on this project. But as far as I remember, we added a check that new ID after Office.context.mailbox.item.saveAsync() was really saved in Exchange. It looked messy, but we didn't find a better way how to do it.
Here is more info about this issue:
https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/34593391-immediate-synced-to-the-server-saveasync-to-get
Most helpful comment
Thanks for raising it. We are working on towards fixing it.