Skip to content
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

[Outlook] (attachments) Document attachment limitation for Outlook on the web and the new Outlook on Windows #5003

Draft
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Add and remove attachments in an Outlook add-in
description: Use various attachment APIs to manage the files or Outlook items attached to the item the user is composing.
ms.date: 11/19/2024
ms.date: 01/28/2025
ms.topic: how-to
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -158,6 +158,9 @@ The following APIs to get attachments in compose mode are available from [requir

Use the [getAttachmentsAsync](/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#methods) method to get the attachments of the message or appointment being composed.

> [!NOTE]
> In Outlook on the web and the new Outlook on Windows, users can select the **Upload and share** option to upload an attachment to OneDrive and include a link to the file in the mail item. However, since only a link is included, `getAttachmentsAsync` doesn't return this attachment.

To get an attachment's content, use the [getAttachmentContentAsync](/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#methods) method. The supported formats are listed in the [AttachmentContentFormat](/javascript/api/outlook/office.mailboxenums.attachmentcontentformat) enum.

You should provide a callback function to check for the status and any error by using the `AsyncResult` output parameter object. You can also pass any additional parameters to the callback function by using the optional `asyncContext` parameter.
Expand Down