Office.ReplyFormAttachment interface

A file or item attachment. Used when displaying a reply form.

Remarks

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-with-attachments.yaml

// The async version is only available starting with requirement set 1.9.
// It provides a callback when the new appointment form has been created.
Office.context.mailbox.item.displayReplyFormAsync(
  {
    htmlBody: "This is a reply with an inline image and an item attachment.<br><img src='cid:dog.jpg'>",
    attachments: [
      { type: "file", url: "http://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true },
      { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" }
    ]
  },
  (asyncResult) => {
    console.log(JSON.stringify(asyncResult));
  }
);

Properties

inLine

Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list.

itemId

Only used if type is set to item. The EWS item ID of the attachment. This is a string up to 100 characters.

name

A string that contains the name of the attachment, up to 255 characters in length.

type

Indicates the type of attachment. Must be file for a file attachment or item for an item attachment.

url

Only used if type is set to file. The URI of the location for the file.

Important: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication.

Property Details

inLine

Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list.

inLine?: boolean;

Property Value

boolean

itemId

Only used if type is set to item. The EWS item ID of the attachment. This is a string up to 100 characters.

itemId?: string;

Property Value

string

name

A string that contains the name of the attachment, up to 255 characters in length.

name: string;

Property Value

string

type

Indicates the type of attachment. Must be file for a file attachment or item for an item attachment.

type: string;

Property Value

string

url

Only used if type is set to file. The URI of the location for the file.

Important: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication.

url?: string;

Property Value

string