-
Notifications
You must be signed in to change notification settings - Fork 63
/
office.mailboxenums.attachmentcontentformat.yml
74 lines (63 loc) · 2.66 KB
/
office.mailboxenums.attachmentcontentformat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
### YamlMime:TSEnum
name: Office.MailboxEnums.AttachmentContentFormat
uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat:enum'
package: outlook!
fullName: Office.MailboxEnums.AttachmentContentFormat
summary: Specifies the formatting that applies to an attachment's content.
remarks: >-
\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]
**[Applicable Outlook
mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)<!-- -->**:
Compose or Read
#### Examples
```TypeScript
// 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);
}
```
isPreview: false
isDeprecated: false
fields:
- name: Base64
uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat.Base64:member'
package: outlook!
summary: The content of the attachment is returned as a base64-encoded string.
value: '"base64"'
- name: Url
uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat.Url:member'
package: outlook!
summary: The content of the attachment is returned as a string representing a URL.
value: '"url"'
- name: Eml
uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat.Eml:member'
package: outlook!
summary: The content of the attachment is returned as a string representing an .eml formatted file.
value: '"eml"'
- name: ICalendar
uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat.ICalendar:member'
package: outlook!
summary: The content of the attachment is returned as a string representing an .icalendar formatted file.
value: '"iCalendar"'