Skip to content

Commit 3254f3e

Browse files
AlexJerabekgithub-actions
andauthored
Automatically generated docs (#2281)
Co-authored-by: github-actions <[email protected]>
1 parent ccb4a51 commit 3254f3e

38 files changed

+123
-260
lines changed

docs/docs-ref-autogen/outlook/outlook/office.appointmentcompose.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,16 +2530,9 @@ methods:
25302530
25312531
25322532
// Gets the attachments of the current message or appointment in compose
2533-
mode.
2533+
mode. The getAttachmentsAsync call can only be used in compose mode.
25342534
2535-
const options = { asyncContext: { currentItem: item } };
2536-
2537-
// The getAttachmentsAsync call can only be used in compose mode.
2538-
2539-
item.getAttachmentsAsync(options, callback);
2540-
2541-
2542-
function callback(result) {
2535+
Office.context.mailbox.item.getAttachmentsAsync((result) => {
25432536
if (result.status === Office.AsyncResultStatus.Failed) {
25442537
console.log(result.error.message);
25452538
return;
@@ -2552,9 +2545,9 @@ methods:
25522545
25532546
for (let i = 0; i < result.value.length; i++) {
25542547
// Log the attachment type and its contents to the console.
2555-
result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
2548+
Office.context.mailbox.item.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
25562549
}
2557-
}
2550+
});
25582551
25592552
```
25602553

docs/docs-ref-autogen/outlook/outlook/office.appointmentread.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,9 +2216,9 @@ methods:
22162216
22172217
22182218
// Gets the attachments of the current message or appointment in read
2219-
mode.
2219+
mode. The item.attachments call can only be used in read mode.
22202220
2221-
// The item.attachments call can only be used in read mode.
2221+
const item = Office.context.mailbox.item;
22222222
22232223
const attachments = item.attachments;
22242224

docs/docs-ref-autogen/outlook/outlook/office.messagecompose.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,16 +2541,9 @@ methods:
25412541
25422542
25432543
// Gets the attachments of the current message or appointment in compose
2544-
mode.
2545-
2546-
const options = { asyncContext: { currentItem: item } };
2547-
2548-
// The getAttachmentsAsync call can only be used in compose mode.
2549-
2550-
item.getAttachmentsAsync(options, callback);
2544+
mode. The getAttachmentsAsync call can only be used in compose mode.
25512545
2552-
2553-
function callback(result) {
2546+
Office.context.mailbox.item.getAttachmentsAsync((result) => {
25542547
if (result.status === Office.AsyncResultStatus.Failed) {
25552548
console.log(result.error.message);
25562549
return;
@@ -2563,9 +2556,9 @@ methods:
25632556
25642557
for (let i = 0; i < result.value.length; i++) {
25652558
// Log the attachment type and its contents to the console.
2566-
result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
2559+
Office.context.mailbox.item.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
25672560
}
2568-
}
2561+
});
25692562
25702563
```
25712564

docs/docs-ref-autogen/outlook/outlook/office.messageread.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,9 +2611,9 @@ methods:
26112611
26122612
26132613
// Gets the attachments of the current message or appointment in read
2614-
mode.
2614+
mode. The item.attachments call can only be used in read mode.
26152615
2616-
// The item.attachments call can only be used in read mode.
2616+
const item = Office.context.mailbox.item;
26172617
26182618
const attachments = item.attachments;
26192619

docs/docs-ref-autogen/outlook_1_10/outlook/office.appointmentcompose.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,16 +2275,9 @@ methods:
22752275
22762276
22772277
// Gets the attachments of the current message or appointment in compose
2278-
mode.
2278+
mode. The getAttachmentsAsync call can only be used in compose mode.
22792279
2280-
const options = { asyncContext: { currentItem: item } };
2281-
2282-
// The getAttachmentsAsync call can only be used in compose mode.
2283-
2284-
item.getAttachmentsAsync(options, callback);
2285-
2286-
2287-
function callback(result) {
2280+
Office.context.mailbox.item.getAttachmentsAsync((result) => {
22882281
if (result.status === Office.AsyncResultStatus.Failed) {
22892282
console.log(result.error.message);
22902283
return;
@@ -2297,9 +2290,9 @@ methods:
22972290
22982291
for (let i = 0; i < result.value.length; i++) {
22992292
// Log the attachment type and its contents to the console.
2300-
result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
2293+
Office.context.mailbox.item.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
23012294
}
2302-
}
2295+
});
23032296
23042297
```
23052298

docs/docs-ref-autogen/outlook_1_10/outlook/office.appointmentread.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,9 +2102,9 @@ methods:
21022102
21032103
21042104
// Gets the attachments of the current message or appointment in read
2105-
mode.
2105+
mode. The item.attachments call can only be used in read mode.
21062106
2107-
// The item.attachments call can only be used in read mode.
2107+
const item = Office.context.mailbox.item;
21082108
21092109
const attachments = item.attachments;
21102110

docs/docs-ref-autogen/outlook_1_10/outlook/office.messagecompose.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,16 +2120,9 @@ methods:
21202120
21212121
21222122
// Gets the attachments of the current message or appointment in compose
2123-
mode.
2124-
2125-
const options = { asyncContext: { currentItem: item } };
2126-
2127-
// The getAttachmentsAsync call can only be used in compose mode.
2128-
2129-
item.getAttachmentsAsync(options, callback);
2123+
mode. The getAttachmentsAsync call can only be used in compose mode.
21302124
2131-
2132-
function callback(result) {
2125+
Office.context.mailbox.item.getAttachmentsAsync((result) => {
21332126
if (result.status === Office.AsyncResultStatus.Failed) {
21342127
console.log(result.error.message);
21352128
return;
@@ -2142,9 +2135,9 @@ methods:
21422135
21432136
for (let i = 0; i < result.value.length; i++) {
21442137
// Log the attachment type and its contents to the console.
2145-
result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
2138+
Office.context.mailbox.item.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
21462139
}
2147-
}
2140+
});
21482141
21492142
```
21502143

docs/docs-ref-autogen/outlook_1_10/outlook/office.messageread.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,9 +2442,9 @@ methods:
24422442
24432443
24442444
// Gets the attachments of the current message or appointment in read
2445-
mode.
2445+
mode. The item.attachments call can only be used in read mode.
24462446
2447-
// The item.attachments call can only be used in read mode.
2447+
const item = Office.context.mailbox.item;
24482448
24492449
const attachments = item.attachments;
24502450

docs/docs-ref-autogen/outlook_1_11/outlook/office.appointmentcompose.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2328,16 +2328,9 @@ methods:
23282328
23292329
23302330
// Gets the attachments of the current message or appointment in compose
2331-
mode.
2331+
mode. The getAttachmentsAsync call can only be used in compose mode.
23322332
2333-
const options = { asyncContext: { currentItem: item } };
2334-
2335-
// The getAttachmentsAsync call can only be used in compose mode.
2336-
2337-
item.getAttachmentsAsync(options, callback);
2338-
2339-
2340-
function callback(result) {
2333+
Office.context.mailbox.item.getAttachmentsAsync((result) => {
23412334
if (result.status === Office.AsyncResultStatus.Failed) {
23422335
console.log(result.error.message);
23432336
return;
@@ -2350,9 +2343,9 @@ methods:
23502343
23512344
for (let i = 0; i < result.value.length; i++) {
23522345
// Log the attachment type and its contents to the console.
2353-
result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
2346+
Office.context.mailbox.item.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback);
23542347
}
2355-
}
2348+
});
23562349
23572350
```
23582351

docs/docs-ref-autogen/outlook_1_11/outlook/office.appointmentread.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,9 +2102,9 @@ methods:
21022102
21032103
21042104
// Gets the attachments of the current message or appointment in read
2105-
mode.
2105+
mode. The item.attachments call can only be used in read mode.
21062106
2107-
// The item.attachments call can only be used in read mode.
2107+
const item = Office.context.mailbox.item;
21082108
21092109
const attachments = item.attachments;
21102110

0 commit comments

Comments
 (0)