none
How to get selected message Format from outlook using JavaScript RRS feed

All replies

  • We have an API to retrieve the message format in compose mode : Office.context.mailbox.item.body.getTypeAsync.

    Here's an example of how to use it:

    Office.context.mailbox.item.body.getTypeAsync(
        { },
        function(asyncResult)
        {
            if (asyncResult.status == Office.AsyncResultStatus.Succeeded)
            {
                console.log(asyncResult.value);
            }
        }
    );

    For HTML & RTF e-mails, asyncResult.value == Office.CoercionType.Html
    For Plain Text e-mails, asyncResult.value == Office.CoercionType.Text

    This API is not available for read mode.

    Is this sufficient for the scenario you are trying to achieve?


    Alert sent from MSDN

    Thursday, August 31, 2017 9:28 AM