Office.ReplyFormAttachment interface

文件或项目附件。 在显示答复表单时使用。

注解

示例

// 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));
  }
);

属性

inLine

仅当 type 设置为 file 时才使用。 如果为 true,则表示附件将在邮件正文中内联显示,不应显示在附件列表中。

itemId

仅当 type 设置为 item 时才使用。 附件的 EWS 项 ID。 字符串最长为 100 个字符。

name

一个包含附件的名称的字符串,最多包含 255 个字符。

type

指示附件的类型。 必须是文件附件的文件或项目附件的项。

url

仅当 type 设置为 file 时才使用。 文件的位置的 URI。

重要提示:此链接必须可公开访问,无需 Exchange Online 服务器进行身份验证。 但是,使用本地 Exchange 时,只要不需要进一步身份验证,就可以在专用网络上访问链接。

属性详细信息

inLine

仅当 type 设置为 file 时才使用。 如果为 true,则表示附件将在邮件正文中内联显示,不应显示在附件列表中。

inLine?: boolean;

属性值

boolean

itemId

仅当 type 设置为 item 时才使用。 附件的 EWS 项 ID。 字符串最长为 100 个字符。

itemId?: string;

属性值

string

name

一个包含附件的名称的字符串,最多包含 255 个字符。

name: string;

属性值

string

type

指示附件的类型。 必须是文件附件的文件或项目附件的项。

type: string;

属性值

string

url

仅当 type 设置为 file 时才使用。 文件的位置的 URI。

重要提示:此链接必须可公开访问,无需 Exchange Online 服务器进行身份验证。 但是,使用本地 Exchange 时,只要不需要进一步身份验证,就可以在专用网络上访问链接。

url?: string;

属性值

string