Office.MailboxEnums.AttachmentContentFormat enum
Specifies the formatting that applies to an attachment's content.
Remarks
Applicable Outlook mode: Compose or Read
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachment-content.yaml
function handleAttachmentsCallback(result) {
// Identifies whether the attachment is a Base64-encoded string, .eml file, .icalendar file, or a URL.
switch (result.value.format) {
case Office.MailboxEnums.AttachmentContentFormat.Base64:
// Handle file attachment.
console.log("Attachment is a Base64-encoded string.");
break;
case Office.MailboxEnums.AttachmentContentFormat.Eml:
// Handle email item attachment.
console.log("Attachment is a message.");
break;
case Office.MailboxEnums.AttachmentContentFormat.ICalendar:
// Handle .icalender attachment.
console.log("Attachment is a calendar item.");
break;
case Office.MailboxEnums.AttachmentContentFormat.Url:
// Handle cloud attachment.
console.log("Attachment is a cloud attachment.");
break;
default:
// Handle attachment formats that aren't supported.
}
console.log(result.value.content);
}
Fields
Base64 = "base64" | The content of the attachment is returned as a Base64-encoded string. |
Url = "url" | The content of the attachment is returned as a string representing a URL. |
Eml = "eml" | The content of the attachment is returned as a string representing an .eml formatted file. |
ICalendar = "iCalendar" | The content of the attachment is returned as a string representing an .icalendar formatted file. |
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Office Add-ins