Office.context.mailbox.item.body.getAsync () method does not work in Outlook Outlook 2016

In the 365 office outlook add-in, the Office.context.mailbox.item.body.getAsync()method does not work in Outlook Mac . But it works great in safari and chrome .

office js reference " https://appsforoffice.microsoft.com/lib/1/hosted/office.js "

here is the add-in code to read.

     var _item = Office.context.mailbox.item;
     var body = _item.body;
        // Get the body asynchronous as text
        body.getAsync(Office.CoercionType.Text, function (asyncResult) {
            if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
            }
            else {
                $('#subject').html(asyncResult.value.trim());
            }
        });         
+4
source share
2 answers

This feature is part of the set of requirements 1.3; Mac add ins only supports requirements set 1.1 .

+4
source

, . makeEwsRequestAsync(), 1.1. , SOAP , . SOAP :

    '        <t:AdditionalProperties>' +
    '            <t:FieldURI FieldURI="item:TextBody"/>' +
    '        </t:AdditionalProperties>' +

, .

: https://dev.outlook.com/reference/add-ins/1.1/Office.context.mailbox.html#makeEwsRequestAsync

0

All Articles