File tree 9 files changed +669
-95
lines changed 9 files changed +669
-95
lines changed Original file line number Diff line number Diff line change 387
387
- id : outlook-display-items-display-reply-with-attachments
388
388
name : Create a reply with attachments
389
389
fileName : display-reply-with-attachments.yaml
390
- description : Opens a reply message forms and adds sample attachments.
390
+ description : Opens a reply or reply-all message form and adds sample attachments.
391
391
rawUrl : >-
392
392
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-with-attachments.yaml
393
393
group : Display Items
784
784
group : Other Item APIs
785
785
api_set :
786
786
Mailbox : ' 1.8'
787
+ - id : outlook-send-async
788
+ name : Send the current message or appointment (Compose)
789
+ fileName : send-async.yaml
790
+ description : Sends the current message or appointment.
791
+ rawUrl : >-
792
+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/send-async.yaml
793
+ group : Other Item APIs
794
+ api_set :
795
+ Mailbox : ' 1.15'
787
796
- id : outlook-get-set-isalldayevent
788
797
name : Get and set the isAllDayEvent property (Appointment Organizer)
789
798
fileName : get-set-isalldayevent.yaml
793
802
group : Preview APIs
794
803
api_set :
795
804
Mailbox : preview
796
- - id : outlook-send-async
797
- name : Send the current message or appointment (Compose)
798
- fileName : send-async.yaml
799
- description : Send the current message or appointment.
800
- rawUrl : >-
801
- https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/send-async.yaml
802
- group : Preview APIs
803
- api_set :
804
- Mailbox : preview
805
805
- id : outlook-set-displayed-body-subject
806
806
name : Temporarily set the body or subject displayed in a message (Message Read)
807
807
fileName : set-displayed-body-subject.yaml
Original file line number Diff line number Diff line change 387
387
- id : outlook-display-items-display-reply-with-attachments
388
388
name : Create a reply with attachments
389
389
fileName : display-reply-with-attachments.yaml
390
- description : Opens a reply message forms and adds sample attachments.
390
+ description : Opens a reply or reply-all message form and adds sample attachments.
391
391
rawUrl : >-
392
392
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/55-display-items/display-reply-with-attachments.yaml
393
393
group : Display Items
784
784
group : Other Item APIs
785
785
api_set :
786
786
Mailbox : ' 1.8'
787
+ - id : outlook-send-async
788
+ name : Send the current message or appointment (Compose)
789
+ fileName : send-async.yaml
790
+ description : Sends the current message or appointment.
791
+ rawUrl : >-
792
+ https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/send-async.yaml
793
+ group : Other Item APIs
794
+ api_set :
795
+ Mailbox : ' 1.15'
787
796
- id : outlook-get-set-isalldayevent
788
797
name : Get and set the isAllDayEvent property (Appointment Organizer)
789
798
fileName : get-set-isalldayevent.yaml
793
802
group : Preview APIs
794
803
api_set :
795
804
Mailbox : preview
796
- - id : outlook-send-async
797
- name : Send the current message or appointment (Compose)
798
- fileName : send-async.yaml
799
- description : Send the current message or appointment.
800
- rawUrl : >-
801
- https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/send-async.yaml
802
- group : Preview APIs
803
- api_set :
804
- Mailbox : preview
805
805
- id : outlook-set-displayed-body-subject
806
806
name : Temporarily set the body or subject displayed in a message (Message Read)
807
807
fileName : set-displayed-body-subject.yaml
Original file line number Diff line number Diff line change 9
9
$("#run").on("click", run);
10
10
11
11
function run() {
12
- const attachments = Office.context.mailbox.item.attachments;
13
- console.log(attachments);
12
+ const item = Office.context.mailbox.item;
13
+
14
+ if (item.attachments.length > 0) {
15
+ for (let i = 0; i < item.attachments.length; i++) {
16
+ const attachment = item.attachments[i];
17
+ console.log(`${i+1}. Name: ${attachment.name}`);
18
+ console.log(`ID: ${attachment.id}`);
19
+ console.log(`Type: ${attachment.attachmentType}`);
20
+ console.log(`Inline content: ${attachment.isInline}`);
21
+ console.log(`Size: ${attachment.size}`);
22
+ }
23
+ } else {
24
+ console.log("This mail item doesn't contain any attachments.");
25
+ }
14
26
}
15
27
language : typescript
16
28
template :
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
- order : 2
1
+ order : 30
2
2
id : outlook-send-async
3
3
name : Send the current message or appointment (Compose)
4
4
description : Sends the current message or appointment.
5
5
host : OUTLOOK
6
6
api_set :
7
- Mailbox : preview
7
+ Mailbox : ' 1.15 '
8
8
script :
9
9
content : |
10
10
$("#send-async").on("click", sendAsync);
47
47
}
48
48
language : css
49
49
libraries : |-
50
- https://appsforoffice.microsoft.com/lib/beta /hosted/office.js
51
- @types/office-js-preview
50
+ https://appsforoffice.microsoft.com/lib/1 /hosted/office.js
51
+ @types/office-js
52
52
53
53
office-ui-fabric-core@11.1.0/dist/css/fabric.min.css
54
54
office-ui-fabric-js@1.5.0/dist/css/fabric.components.min.css
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 82
82
"outlook-get-conversation-index" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-conversation-index.yaml" ,
83
83
"outlook-get-item-class-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-class-async.yaml" ,
84
84
"outlook-other-item-apis-item-id-compose" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/item-id-compose.yaml" ,
85
+ "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/send-async.yaml" ,
85
86
"outlook-get-set-isalldayevent" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/get-set-isalldayevent.yaml" ,
86
- "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/send-async.yaml" ,
87
87
"outlook-set-displayed-body-subject" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/99-preview-apis/set-displayed-body-subject.yaml"
88
88
}
Original file line number Diff line number Diff line change 82
82
"outlook-get-conversation-index" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/get-conversation-index.yaml" ,
83
83
"outlook-get-item-class-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/get-item-class-async.yaml" ,
84
84
"outlook-other-item-apis-item-id-compose" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/item-id-compose.yaml" ,
85
+ "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/90-other-item-apis/send-async.yaml" ,
85
86
"outlook-get-set-isalldayevent" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/get-set-isalldayevent.yaml" ,
86
- "outlook-send-async" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/send-async.yaml" ,
87
87
"outlook-set-displayed-body-subject" : " https://raw.githubusercontent.com/OfficeDev/office-js-snippets/main/samples/outlook/99-preview-apis/set-displayed-body-subject.yaml"
88
88
}
You can’t perform that action at this time.
0 commit comments