Office.MailboxEnums.AttachmentContentFormat enum
Gibt die Formatierung an, die für den Inhalt einer Anlage gilt.
Hinweise
Anwendbarer Outlook-Modus: Compose oder Lesen
Beispiele
// 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);
}
Felder
| Base64 = "base64" | Der Inhalt der Anlage wird als Base64-codierte Zeichenfolge zurückgegeben. |
| Url = "url" | Der Inhalt der Anlage wird als Zeichenfolge zurückgegeben, die eine URL darstellt. |
| Eml = "eml" | Der Inhalt der Anlage wird als Zeichenfolge zurückgegeben, die eine .eml formatierte Datei darstellt. |
| ICalendar = "iCalendar" | Der Inhalt der Anlage wird als Zeichenfolge zurückgegeben, die eine Datei im ICALENDAR-Format darstellt. |