Skip to content

[Outlook] (Body API) Document support for the Body.getAsync improvements on mobile devices #5291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions docs/outlook/insert-data-in-the-body.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Get or set the body of a message or appointment in Outlook
description: Learn how to get or insert data into the body of an appointment or message of an Outlook add-in.
ms.date: 06/03/2025
ms.date: 07/24/2025
ms.topic: how-to
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -32,20 +32,22 @@ Office.context.mailbox.item.body.getAsync(Office.CoercionType.Html, (bodyResult)
});
```

## Get the body of message replies in Outlook on the web or the new Outlook on Windows
## Get the body of message replies in Outlook on the web, on mobile, or in the new Outlook on Windows

In Outlook on the web and the [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**. This setting affects how much of a message's body is displayed to the user, particularly in conversation threads with multiple messages. Depending on the setting, the contents of the entire conversation thread or just the current message is displayed. For more information on the **Message Organization** setting, see [Change how the message list is displayed in Outlook](https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042).
In Outlook on the web, on mobile devices, and in the [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), when you call `Office.context.mailbox.item.body.getAsync` on a message reply, the entire body of a conversation thread is returned. If you only need the current reply, you can specify the [bodyMode](/javascript/api/outlook/office.mailboxenums.bodymode) option in the `getAsync` call.

When you call `Office.context.mailbox.item.body.getAsync` on a message reply, the entire body of a conversation thread is returned. If you want the returned body to reflect the user's **Message Organization** setting, you can specify the [bodyMode](/javascript/api/outlook/office.mailboxenums.bodymode) option in the `getAsync` call. The following table lists the portion of the body returned depending on the `bodyMode` configuration.
In Outlook on the web and the new Outlook on Windows, you can use the `bodyMode` option to reflect a user's **Message Organization** setting. Users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**. This setting affects how much of a message's body is displayed to the user, particularly in conversation threads with multiple messages. Depending on the setting, the contents of the entire conversation thread or just the current message is displayed. For more information on the **Message Organization** setting, see [Change how the message list is displayed in Outlook](https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042).

| bodyMode configuration | Effect on body |
The following table lists the portion of the body returned depending on the `bodyMode` configuration.

| bodyMode configuration | Effect on body returned |
| ----- | ----- |
| `bodyMode` isn't specified in the `getAsync` call | The entire body of the conversation thread is returned. |
| `bodyMode` is set to `Office.MailboxEnums.BodyMode.FullBody` | The entire body of the conversation thread is returned. |
| `bodyMode` is set to `Office.MailboxEnums.BodyMode.HostConfig` | If **Message Organization** is set to **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**/**Newest on bottom**, only the body of the current reply is returned.<br><br>If **Message Organization** is set to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages**, the entire body of the conversation thread is returned. |
| `bodyMode` isn't specified in the `getAsync` call | The entire body of the conversation thread is returned. However, in Outlook on mobile, while in quick reply mode (the reply field at the bottom of the message), only the body of the current reply is returned. |
| `bodyMode` is set to `Office.MailboxEnums.BodyMode.FullBody` | The entire body of the conversation thread is returned. However, in Outlook on mobile, while in quick reply mode, only the body of the current reply is returned. |
| `bodyMode` is set to `Office.MailboxEnums.BodyMode.HostConfig` | In Outlook on the web and the new Outlook on Windows, if **Message Organization** is set to **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**/**Newest on bottom**, only the body of the current reply is returned. Conversely, if **Message Organization** is set to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages**, the entire body of the conversation thread is returned.<br><br>In Outlook on mobile, only the body of the current reply is returned. |

> [!NOTE]
> The `bodyMode` option is ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
> The `bodyMode` option is ignored in Outlook on Windows (classic) and on Mac.

The following example specifies the `bodyMode` option to honor the user's message setting.

Expand Down