Office.MailboxEnums.ItemType enum
指定项的类型。
注解
适用的 Outlook 模式:Compose或读取
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml
const itemType = Office.context.mailbox.item.itemType;
switch (itemType) {
case Office.MailboxEnums.ItemType.Appointment:
console.log(`Current item is an ${itemType}.`);
break;
case Office.MailboxEnums.ItemType.Message:
console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`);
break;
}
字段
Message = "message" | 电子邮件、会议请求、会议响应或会议取消。 |
Appointment = "appointment" | 约会项目。 |