Office.MailboxEnums.AttachmentType enum
添付ファイルの種類を指定します。
注釈
適用できる Outlook モード: 新規作成または読み取り
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml
Office.context.mailbox.item.getAttachmentsAsync(function (result) {
if (result.status !== Office.AsyncResultStatus.Succeeded) {
console.error(result.error.message);
} else {
if (result.value.length > 0) {
for (let i = 0; i < result.value.length; i++) {
const attachment = result.value[i];
console.log("ID: " + attachment.id + "\n" +
"Name: " + attachment.name + "\n" +
"Size: " + attachment.size + "\n" +
"isInline: " + attachment.isInline);
switch (attachment.attachmentType) {
case Office.MailboxEnums.AttachmentType.Cloud:
console.log("Attachment type: Attachment is stored in a cloud location.");
break;
case Office.MailboxEnums.AttachmentType.File:
console.log("Attachment type: Attachment is a file.");
break;
case Office.MailboxEnums.AttachmentType.Item:
console.log("Attachment type: Attachment is an Exchange item.");
break;
}
}
}
else {
console.log("No attachments on this message.");
}
}
});
フィールド
File = "file" | この添付ファイルはファイルです。 |
Item = "item" | この添付ファイルは Exchange のアイテムです。 |
Cloud = "cloud" | 添付ファイルは、OneDrive などのクラウドの場所に格納されます。 重要: 読み取りモードでは、 |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Add-ins
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示