diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 7a559d1bf8..6b3055e31c 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -42,6 +42,7 @@ "outlook-js-1.12", "outlook-js-1.13", "outlook-js-1.14", + "outlook-js-1.15", "powerpoint-js-preview", "powerpoint-js-1.1", "powerpoint-js-1.2", @@ -183,6 +184,10 @@ "ReferenceTOC": "docs/docs-ref-autogen/outlook_1_14/toc.yml", "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" }, + { + "ReferenceTOC": "docs/docs-ref-autogen/outlook_1_15/toc.yml", + "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" + }, { "ReferenceTOC": "docs/docs-ref-autogen/excel/toc.yml", "ConceptualTOCUrl": "/office/dev/add-ins/toc.json" diff --git a/docs/docfx.json b/docs/docfx.json index ed1fe41b7e..935c8f9d50 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -299,6 +299,12 @@ "src": "docs-ref-autogen/outlook_1_14", "dest": "api" }, + { + "files": ["**/*.md", "**/*.yml"], + "group": "outlook-js-1.15", + "src": "docs-ref-autogen/outlook_1_15", + "dest": "api" + }, { "files": ["**/toc.yml"], "group": "excel-js-preview", @@ -903,6 +909,10 @@ "dest": "outlook-js-1.14", "moniker_range": "outlook-js-1.14" }, + "outlook-js-1.15": { + "dest": "outlook-js-1.15", + "moniker_range": "outlook-js-1.15" + }, "excel-js-preview": { "dest": "excel-js-preview", "moniker_range": "excel-js-preview" @@ -1168,6 +1178,7 @@ "docs-ref-autogen/outlook_1_12/**": "outlook", "docs-ref-autogen/outlook_1_13/**": "outlook", "docs-ref-autogen/outlook_1_14/**": "outlook", + "docs-ref-autogen/outlook_1_15/**": "outlook", "docs-ref-autogen/powerpoint/**": "powerpoint", "docs-ref-autogen/powerpoint_1_1/**": "powerpoint", "docs-ref-autogen/powerpoint_1_2/**": "powerpoint", diff --git a/docs/docs-ref-autogen/common/toc.yml b/docs/docs-ref-autogen/common/toc.yml index 8d2080db82..a473ce5aa8 100644 --- a/docs/docs-ref-autogen/common/toc.yml +++ b/docs/docs-ref-autogen/common/toc.yml @@ -573,6 +573,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/common_preview/toc.yml b/docs/docs-ref-autogen/common_preview/toc.yml index 2b7cd81d1d..4465b6629d 100644 --- a/docs/docs-ref-autogen/common_preview/toc.yml +++ b/docs/docs-ref-autogen/common_preview/toc.yml @@ -575,6 +575,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel/toc.yml b/docs/docs-ref-autogen/excel/toc.yml index 6f0bfa9c87..1e0a512ab7 100644 --- a/docs/docs-ref-autogen/excel/toc.yml +++ b/docs/docs-ref-autogen/excel/toc.yml @@ -1723,6 +1723,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_1/toc.yml b/docs/docs-ref-autogen/excel_1_1/toc.yml index 8260ac0c48..b6849e1f00 100644 --- a/docs/docs-ref-autogen/excel_1_1/toc.yml +++ b/docs/docs-ref-autogen/excel_1_1/toc.yml @@ -715,6 +715,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_10/toc.yml b/docs/docs-ref-autogen/excel_1_10/toc.yml index a77b612f8a..439512e927 100644 --- a/docs/docs-ref-autogen/excel_1_10/toc.yml +++ b/docs/docs-ref-autogen/excel_1_10/toc.yml @@ -1399,6 +1399,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_11/toc.yml b/docs/docs-ref-autogen/excel_1_11/toc.yml index 8e2ee3c840..b76113a24a 100644 --- a/docs/docs-ref-autogen/excel_1_11/toc.yml +++ b/docs/docs-ref-autogen/excel_1_11/toc.yml @@ -1411,6 +1411,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_12/toc.yml b/docs/docs-ref-autogen/excel_1_12/toc.yml index d6ab1a650a..91a59c2385 100644 --- a/docs/docs-ref-autogen/excel_1_12/toc.yml +++ b/docs/docs-ref-autogen/excel_1_12/toc.yml @@ -1457,6 +1457,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_13/toc.yml b/docs/docs-ref-autogen/excel_1_13/toc.yml index ce7bf175fa..225af6e4a5 100644 --- a/docs/docs-ref-autogen/excel_1_13/toc.yml +++ b/docs/docs-ref-autogen/excel_1_13/toc.yml @@ -1467,6 +1467,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_14/toc.yml b/docs/docs-ref-autogen/excel_1_14/toc.yml index 9a01494551..7fb4f93db7 100644 --- a/docs/docs-ref-autogen/excel_1_14/toc.yml +++ b/docs/docs-ref-autogen/excel_1_14/toc.yml @@ -1485,6 +1485,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_15/toc.yml b/docs/docs-ref-autogen/excel_1_15/toc.yml index 8b61f9371f..290540cf7f 100644 --- a/docs/docs-ref-autogen/excel_1_15/toc.yml +++ b/docs/docs-ref-autogen/excel_1_15/toc.yml @@ -1489,6 +1489,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_16/toc.yml b/docs/docs-ref-autogen/excel_1_16/toc.yml index a9b4c88b8e..6b5a5e44f8 100644 --- a/docs/docs-ref-autogen/excel_1_16/toc.yml +++ b/docs/docs-ref-autogen/excel_1_16/toc.yml @@ -1619,6 +1619,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_17/toc.yml b/docs/docs-ref-autogen/excel_1_17/toc.yml index 1079d5e569..b6ba5a863a 100644 --- a/docs/docs-ref-autogen/excel_1_17/toc.yml +++ b/docs/docs-ref-autogen/excel_1_17/toc.yml @@ -1625,6 +1625,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_2/toc.yml b/docs/docs-ref-autogen/excel_1_2/toc.yml index f22728c77f..74870b8421 100644 --- a/docs/docs-ref-autogen/excel_1_2/toc.yml +++ b/docs/docs-ref-autogen/excel_1_2/toc.yml @@ -812,6 +812,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_3/toc.yml b/docs/docs-ref-autogen/excel_1_3/toc.yml index 8a7d346d95..01335fea9e 100644 --- a/docs/docs-ref-autogen/excel_1_3/toc.yml +++ b/docs/docs-ref-autogen/excel_1_3/toc.yml @@ -820,6 +820,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_4/toc.yml b/docs/docs-ref-autogen/excel_1_4/toc.yml index db649f4ae7..7ccba60e09 100644 --- a/docs/docs-ref-autogen/excel_1_4/toc.yml +++ b/docs/docs-ref-autogen/excel_1_4/toc.yml @@ -828,6 +828,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_5/toc.yml b/docs/docs-ref-autogen/excel_1_5/toc.yml index 03ff79c7d7..63b5ae5f34 100644 --- a/docs/docs-ref-autogen/excel_1_5/toc.yml +++ b/docs/docs-ref-autogen/excel_1_5/toc.yml @@ -836,6 +836,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_6/toc.yml b/docs/docs-ref-autogen/excel_1_6/toc.yml index 7c8f8d4a43..3ab19eda57 100644 --- a/docs/docs-ref-autogen/excel_1_6/toc.yml +++ b/docs/docs-ref-autogen/excel_1_6/toc.yml @@ -918,6 +918,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_7/toc.yml b/docs/docs-ref-autogen/excel_1_7/toc.yml index 6fdfed72e9..42caf01242 100644 --- a/docs/docs-ref-autogen/excel_1_7/toc.yml +++ b/docs/docs-ref-autogen/excel_1_7/toc.yml @@ -1020,6 +1020,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_8/toc.yml b/docs/docs-ref-autogen/excel_1_8/toc.yml index 9b9466f5ab..bdf621b7ce 100644 --- a/docs/docs-ref-autogen/excel_1_8/toc.yml +++ b/docs/docs-ref-autogen/excel_1_8/toc.yml @@ -1114,6 +1114,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_1_9/toc.yml b/docs/docs-ref-autogen/excel_1_9/toc.yml index 9526339c5d..e0bdaab0db 100644 --- a/docs/docs-ref-autogen/excel_1_9/toc.yml +++ b/docs/docs-ref-autogen/excel_1_9/toc.yml @@ -1355,6 +1355,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/excel_online/toc.yml b/docs/docs-ref-autogen/excel_online/toc.yml index 58b6a9f73f..a6b0cdb293 100644 --- a/docs/docs-ref-autogen/excel_online/toc.yml +++ b/docs/docs-ref-autogen/excel_online/toc.yml @@ -1641,6 +1641,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/onenote/toc.yml b/docs/docs-ref-autogen/onenote/toc.yml index 3c4051e2ff..bc8072b470 100644 --- a/docs/docs-ref-autogen/onenote/toc.yml +++ b/docs/docs-ref-autogen/onenote/toc.yml @@ -677,6 +677,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook/outlook/office.loadedmessagecompose.yml b/docs/docs-ref-autogen/outlook/outlook/office.loadedmessagecompose.yml index a122309f03..95b9cc6fda 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.loadedmessagecompose.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.loadedmessagecompose.yml @@ -7,7 +7,7 @@ summary: >- Represents a message in compose mode that's currently loaded. A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -67,7 +67,7 @@ remarks: >- } ``` -isPreview: true +isPreview: false isDeprecated: false type: interface properties: @@ -98,7 +98,7 @@ properties: - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'bcc: Recipients;' @@ -124,7 +124,7 @@ properties: **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'body: Body;' @@ -147,7 +147,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'categories: Categories;' @@ -177,7 +177,7 @@ properties: - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'cc: Recipients;' @@ -206,7 +206,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'conversationId: string;' @@ -232,7 +232,7 @@ properties: **Important**: Only the `getAsync` method of the DelayDeliveryTime object is supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'delayDeliveryTime: DelayDeliveryTime;' @@ -255,7 +255,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'from: From;' @@ -289,7 +289,7 @@ properties: - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's also the meeting organizer. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'inReplyTo: string;' @@ -320,7 +320,7 @@ properties: **Important**: Only the `getAsync` method of the InternetHeaders object is supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'internetHeaders: InternetHeaders;' @@ -345,7 +345,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'itemType: MailboxEnums.ItemType | string;' @@ -370,11 +370,8 @@ properties: -->**: Message Compose - **Important**: - - - - Only the `getAllAsync` method of the NotificationMessages object is supported. - isPreview: true + **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. + isPreview: false isDeprecated: false syntax: content: 'notificationMessages: NotificationMessages;' @@ -411,7 +408,7 @@ properties: To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your message or appointment in compose mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'sensitivityLabel: SensitivityLabel;' @@ -451,7 +448,7 @@ properties: The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'seriesId: string;' @@ -477,7 +474,7 @@ properties: **Important**: Only the `getAsync` method of the Subject object is supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'subject: Subject;' @@ -509,7 +506,7 @@ properties: - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'to: Recipients;' @@ -553,7 +550,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -616,7 +613,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -654,7 +651,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -694,7 +691,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' @@ -729,7 +726,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -769,7 +766,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -804,7 +801,7 @@ methods: **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents to provide context for the current message being composed. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -846,7 +843,7 @@ methods: **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents to provide context for the current message being composed. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -879,7 +876,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -919,7 +916,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -966,7 +963,7 @@ methods: requests IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1020,7 +1017,7 @@ methods: requests IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1076,7 +1073,7 @@ methods: - `ItemNotSaved`: The ID can't be retrieved until the item is saved. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1129,7 +1126,7 @@ methods: - `ItemNotSaved`: The ID can't be retrieved until the item is saved. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1198,7 +1195,7 @@ methods: The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1277,7 +1274,7 @@ methods: The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1319,7 +1316,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1365,7 +1362,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1410,7 +1407,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1489,7 +1486,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1567,7 +1564,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1589,7 +1586,7 @@ methods: When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -1611,7 +1608,7 @@ methods: - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1639,7 +1636,7 @@ methods: When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -1661,7 +1658,7 @@ methods: - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' diff --git a/docs/docs-ref-autogen/outlook/outlook/office.loadedmessageread.yml b/docs/docs-ref-autogen/outlook/outlook/office.loadedmessageread.yml index 97f26c2b82..1ed2ae114d 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.loadedmessageread.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.loadedmessageread.yml @@ -7,7 +7,7 @@ summary: >- Represents a message in read mode that's currently loaded. A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -67,7 +67,7 @@ remarks: >- } ``` -isPreview: true +isPreview: false isDeprecated: false type: interface properties: @@ -90,7 +90,7 @@ properties: **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. For more information, see [Blocked attachments in Outlook](https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519). - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'attachments: AttachmentDetails[];' @@ -116,7 +116,7 @@ properties: **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'body: Body;' @@ -139,7 +139,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'categories: Categories;' @@ -171,7 +171,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'cc: EmailAddressDetails[];' @@ -197,7 +197,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'conversationId: string;' @@ -217,7 +217,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'dateTimeCreated: Date;' @@ -245,7 +245,7 @@ properties: **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'dateTimeModified: Date;' @@ -274,7 +274,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'end: Date;' @@ -307,7 +307,7 @@ properties: - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'from: EmailAddressDetails;' @@ -333,7 +333,7 @@ properties: sent items. In that case, consider using [Exchange Web Services](https://learn.microsoft.com/office/dev/add-ins/outlook/web-services) to get this [property from the server](https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid). - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'internetMessageId: string;' @@ -372,7 +372,7 @@ properties: You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'itemClass: string;' @@ -411,7 +411,7 @@ properties: -->. The `itemId` property isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'itemId: string;' @@ -436,7 +436,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'itemType: MailboxEnums.ItemType | string;' @@ -459,7 +459,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'location: string;' @@ -485,7 +485,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'normalizedSubject: string;' @@ -514,7 +514,7 @@ properties: - Only the `getAllAsync` method of the NotificationMessages object is supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'notificationMessages: NotificationMessages;' @@ -557,7 +557,7 @@ properties: - Only the propeties and the `getAsync` method of the Recurrence object are supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'recurrence: Recurrence;' @@ -587,7 +587,7 @@ properties: - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'sender: EmailAddressDetails;' @@ -630,7 +630,7 @@ properties: - The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'seriesId: string;' @@ -655,7 +655,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'start: Date;' @@ -683,7 +683,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'subject: string;' @@ -716,7 +716,7 @@ properties: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'to: EmailAddressDetails[];' @@ -758,7 +758,7 @@ methods: - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -819,7 +819,7 @@ methods: - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -875,7 +875,7 @@ methods: - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -936,7 +936,7 @@ methods: - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -979,7 +979,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1024,7 +1024,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' @@ -1057,7 +1057,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1096,7 +1096,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1149,7 +1149,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1213,7 +1213,7 @@ methods: - `InvalidAttachmentId`: The attachment identifier does not exist. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1253,7 +1253,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1293,7 +1293,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1345,7 +1345,7 @@ methods: should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getRegExMatches(): any;' @@ -1397,7 +1397,7 @@ methods: should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getRegExMatchesByName(name: string): string[];' @@ -1451,7 +1451,7 @@ methods: should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getSelectedRegExMatches(): any;' @@ -1486,7 +1486,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1532,7 +1532,7 @@ methods: **[Applicable Outlook mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' @@ -1583,7 +1583,7 @@ methods: **Important**: Only the `get` and `getAll` methods of the CustomProperties object are supported. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1613,7 +1613,7 @@ methods: When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -1635,7 +1635,7 @@ methods: - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -1663,7 +1663,7 @@ methods: When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -1685,7 +1685,7 @@ methods: - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' diff --git a/docs/docs-ref-autogen/outlook/outlook/office.mailbox.yml b/docs/docs-ref-autogen/outlook/outlook/office.mailbox.yml index 0ccf29c744..52562f8c80 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.mailbox.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.mailbox.yml @@ -2562,7 +2562,7 @@ methods: Loads a single mail item by its Exchange Web Services (EWS) ID. Then, gets an object that provides the properties and methods of the loaded item. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -2598,7 +2598,7 @@ methods: - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- @@ -2634,7 +2634,7 @@ methods: Loads a single mail item by its Exchange Web Services (EWS) ID. Then, gets an object that provides the properties and methods of the loaded item. remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission @@ -2670,7 +2670,7 @@ methods: - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. - isPreview: true + isPreview: false isDeprecated: false syntax: content: >- diff --git a/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml b/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml index 4266df9ece..99ea1d4a08 100644 --- a/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml +++ b/docs/docs-ref-autogen/outlook/outlook/office.smartalertseventcompletedoptions.yml @@ -269,7 +269,7 @@ properties: walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough). remarks: >- - \[ [API set: Mailbox preview](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] **[Minimum permission level @@ -296,7 +296,7 @@ properties: - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property. This ensures that the message is displayed properly in Outlook clients that don't support Markdown. - isPreview: true + isPreview: false isDeprecated: false syntax: content: 'errorMessageMarkdown?: string;' diff --git a/docs/docs-ref-autogen/outlook/toc.yml b/docs/docs-ref-autogen/outlook/toc.yml index ed2b075b92..bc7d0dc138 100644 --- a/docs/docs-ref-autogen/outlook/toc.yml +++ b/docs/docs-ref-autogen/outlook/toc.yml @@ -781,6 +781,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_1/toc.yml b/docs/docs-ref-autogen/outlook_1_1/toc.yml index 2ae23c3174..6678eec8d0 100644 --- a/docs/docs-ref-autogen/outlook_1_1/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_1/toc.yml @@ -647,6 +647,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_10/toc.yml b/docs/docs-ref-autogen/outlook_1_10/toc.yml index 4267862fce..395388dffa 100644 --- a/docs/docs-ref-autogen/outlook_1_10/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_10/toc.yml @@ -737,6 +737,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_11/toc.yml b/docs/docs-ref-autogen/outlook_1_11/toc.yml index 8b0efa02bc..a460a84e44 100644 --- a/docs/docs-ref-autogen/outlook_1_11/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_11/toc.yml @@ -739,6 +739,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_12/toc.yml b/docs/docs-ref-autogen/outlook_1_12/toc.yml index 21d8b152f1..2297605dd6 100644 --- a/docs/docs-ref-autogen/outlook_1_12/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_12/toc.yml @@ -741,6 +741,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_13/toc.yml b/docs/docs-ref-autogen/outlook_1_13/toc.yml index caa10c7df8..693b9b6dcf 100644 --- a/docs/docs-ref-autogen/outlook_1_13/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_13/toc.yml @@ -753,6 +753,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_14/toc.yml b/docs/docs-ref-autogen/outlook_1_14/toc.yml index 770eb053ab..b857e8e932 100644 --- a/docs/docs-ref-autogen/outlook_1_14/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_14/toc.yml @@ -767,6 +767,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook.yml b/docs/docs-ref-autogen/outlook_1_15/outlook.yml new file mode 100644 index 0000000000..f9fbf70f8a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook.yml @@ -0,0 +1,109 @@ +### YamlMime:TSPackage +uid: outlook! +name: outlook +type: package +summary: '' +interfaces: + - 'outlook!Office.Appointment:interface' + - 'outlook!Office.AppointmentCompose:interface' + - 'outlook!Office.AppointmentForm:interface' + - 'outlook!Office.AppointmentRead:interface' + - 'outlook!Office.AppointmentTimeChangedEventArgs:interface' + - 'outlook!Office.AttachmentContent:interface' + - 'outlook!Office.AttachmentDetails:interface' + - 'outlook!Office.AttachmentDetailsCompose:interface' + - 'outlook!Office.AttachmentsChangedEventArgs:interface' + - 'outlook!Office.Body:interface' + - 'outlook!Office.Categories:interface' + - 'outlook!Office.CategoryDetails:interface' + - 'outlook!Office.CoercionTypeOptions:interface' + - 'outlook!Office.Contact:interface' + - 'outlook!Office.CustomProperties:interface' + - 'outlook!Office.DelayDeliveryTime:interface' + - 'outlook!Office.Diagnostics:interface' + - 'outlook!Office.EmailAddressDetails:interface' + - 'outlook!Office.EmailUser:interface' + - 'outlook!Office.EnhancedLocation:interface' + - 'outlook!Office.EnhancedLocationsChangedEventArgs:interface' + - 'outlook!Office.Entities:interface' + - 'outlook!Office.From:interface' + - 'outlook!Office.InfobarClickedEventArgs:interface' + - 'outlook!Office.InfobarDetails:interface' + - 'outlook!Office.InternetHeaders:interface' + - 'outlook!Office.Item:interface' + - 'outlook!Office.ItemCompose:interface' + - 'outlook!Office.ItemRead:interface' + - 'outlook!Office.LoadedMessageCompose:interface' + - 'outlook!Office.LoadedMessageRead:interface' + - 'outlook!Office.LocalClientTime:interface' + - 'outlook!Office.Location:interface' + - 'outlook!Office.LocationDetails:interface' + - 'outlook!Office.LocationIdentifier:interface' + - 'outlook!Office.Mailbox:interface' + - 'outlook!Office.MailboxEvent:interface' + - 'outlook!Office.MasterCategories:interface' + - 'outlook!Office.MeetingSuggestion:interface' + - 'outlook!Office.Message:interface' + - 'outlook!Office.MessageCompose:interface' + - 'outlook!Office.MessageRead:interface' + - 'outlook!Office.NotificationMessageAction:interface' + - 'outlook!Office.NotificationMessageDetails:interface' + - 'outlook!Office.NotificationMessages:interface' + - 'outlook!Office.OfficeThemeChangedEventArgs:interface' + - 'outlook!Office.Organizer:interface' + - 'outlook!Office.PhoneNumber:interface' + - 'outlook!Office.Recipients:interface' + - 'outlook!Office.RecipientsChangedEventArgs:interface' + - 'outlook!Office.RecipientsChangedFields:interface' + - 'outlook!Office.Recurrence:interface' + - 'outlook!Office.RecurrenceChangedEventArgs:interface' + - 'outlook!Office.RecurrenceProperties:interface' + - 'outlook!Office.RecurrenceTimeZone:interface' + - 'outlook!Office.ReplyFormAttachment:interface' + - 'outlook!Office.ReplyFormData:interface' + - 'outlook!Office.RoamingSettings:interface' + - 'outlook!Office.SelectedItemDetails:interface' + - 'outlook!Office.Sensitivity:interface' + - 'outlook!Office.SensitivityLabel:interface' + - 'outlook!Office.SensitivityLabelChangedEventArgs:interface' + - 'outlook!Office.SensitivityLabelDetails:interface' + - 'outlook!Office.SensitivityLabelsCatalog:interface' + - 'outlook!Office.SeriesTime:interface' + - 'outlook!Office.SessionData:interface' + - 'outlook!Office.SharedProperties:interface' + - 'outlook!Office.SmartAlertsEventCompletedOptions:interface' + - 'outlook!Office.SpamReportingEventArgs:interface' + - 'outlook!Office.SpamReportingEventCompletedOptions:interface' + - 'outlook!Office.Subject:interface' + - 'outlook!Office.TaskSuggestion:interface' + - 'outlook!Office.Time:interface' + - 'outlook!Office.UserProfile:interface' +enums: + - 'outlook!Office.MailboxEnums.ActionType:enum' + - 'outlook!Office.MailboxEnums.AppointmentSensitivityType:enum' + - 'outlook!Office.MailboxEnums.AttachmentContentFormat:enum' + - 'outlook!Office.MailboxEnums.AttachmentStatus:enum' + - 'outlook!Office.MailboxEnums.AttachmentType:enum' + - 'outlook!Office.MailboxEnums.CategoryColor:enum' + - 'outlook!Office.MailboxEnums.ComposeType:enum' + - 'outlook!Office.MailboxEnums.Days:enum' + - 'outlook!Office.MailboxEnums.DelegatePermissions:enum' + - 'outlook!Office.MailboxEnums.EntityType:enum' + - 'outlook!Office.MailboxEnums.InfobarActionType:enum' + - 'outlook!Office.MailboxEnums.InfobarType:enum' + - 'outlook!Office.MailboxEnums.ItemNotificationMessageType:enum' + - 'outlook!Office.MailboxEnums.ItemType:enum' + - 'outlook!Office.MailboxEnums.LocationType:enum' + - 'outlook!Office.MailboxEnums.Month:enum' + - 'outlook!Office.MailboxEnums.MoveSpamItemTo:enum' + - 'outlook!Office.MailboxEnums.OpenLocation:enum' + - 'outlook!Office.MailboxEnums.OWAView:enum' + - 'outlook!Office.MailboxEnums.RecipientType:enum' + - 'outlook!Office.MailboxEnums.RecurrenceTimeZone:enum' + - 'outlook!Office.MailboxEnums.RecurrenceType:enum' + - 'outlook!Office.MailboxEnums.ResponseType:enum' + - 'outlook!Office.MailboxEnums.RestVersion:enum' + - 'outlook!Office.MailboxEnums.SaveLocation:enum' + - 'outlook!Office.MailboxEnums.SendModeOverride:enum' + - 'outlook!Office.MailboxEnums.SourceProperty:enum' + - 'outlook!Office.MailboxEnums.WeekNumber:enum' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointment.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointment.yml new file mode 100644 index 0000000000..218013d048 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointment.yml @@ -0,0 +1,27 @@ +### YamlMime:TSType +name: Office.Appointment +uid: 'outlook!Office.Appointment:interface' +package: outlook! +fullName: Office.Appointment +summary: >- + The subclass of [Item](xref:outlook!Office.Item:interface) dealing with appointments. + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Child interfaces: + + + - [AppointmentCompose](xref:outlook!Office.AppointmentCompose:interface) + + + - [AppointmentRead](xref:outlook!Office.AppointmentRead:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentcompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentcompose.yml new file mode 100644 index 0000000000..52f347cd5e --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentcompose.yml @@ -0,0 +1,3760 @@ +### YamlMime:TSType +name: Office.AppointmentCompose +uid: 'outlook!Office.AppointmentCompose:interface' +package: outlook! +fullName: Office.AppointmentCompose +summary: >- + The appointment organizer mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Parent interfaces: + + + - [ItemCompose](xref:outlook!Office.ItemCompose:interface) + + + - [Appointment](xref:outlook!Office.Appointment:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'outlook!Office.AppointmentCompose#body:member' + package: outlook! + fullName: body + summary: Gets an object that provides methods for manipulating the body of an item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // This example gets the body of the item as plain text. + + Office.context.mailbox.item.body.getAsync( + "text", + { asyncContext: "This is passed to the callback" }, + function callback(result) { + // Do something with the result. + }); + + // The following is an example of an object that is passed as the result parameter to the callback function. + + { + "value": "TEXT of whole body (including threads below)", + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.AppointmentCompose#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods for managing the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Categories assigned to this item:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + // Note: In order for you to successfully add a category, + + // it must be in the mailbox categories master list. + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const masterCategories = asyncResult.value; + if (masterCategories && masterCategories.length > 0) { + // Grab the first category from the master list. + const categoryToAdd = [masterCategories[0].displayName]; + Office.context.mailbox.item.categories.addAsync(categoryToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully assigned category '${categoryToAdd}' to item.`); + } else { + console.log("categories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories in the master list on this mailbox. You can add categories using Office.context.mailbox.masterCategories.addAsync."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + // Grab the first category assigned to this item. + const categoryToRemove = [categories[0].displayName]; + Office.context.mailbox.item.categories.removeAsync(categoryToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully unassigned category '${categoryToRemove}' from this item.`); + } else { + console.log("categories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: end + uid: 'outlook!Office.AppointmentCompose#end:member' + package: outlook! + fullName: end + summary: >- + Gets or sets the date and time that the appointment is to end. + + + The `end` property is a [Time](xref:outlook!Office.Time:interface) object expressed as a Coordinated Universal + Time (UTC) date and time value. You can use the `convertToLocalClientTime` method to convert the `end` property + value to the client's local date and time. + + + When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to + convert the local time on the client to UTC for the server. + + + **Important**: In the Windows client, you can't use this property to update the end of a recurrence. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // The following example sets the end time of an appointment in compose mode by + + // using the `setAsync` method of the `Time` object. + + const endTime = new Date("3/14/2015"); + + const options = { + // Pass information that can be used in the callback. + asyncContext: {verb: "Set"} + }; + + Office.context.mailbox.item.end.setAsync(endTime, options, function(result) { + if (result.error) { + console.debug(result.error); + } else { + // Access the asyncContext that was passed to the setAsync method. + console.debug("End Time " + result.asyncContext.verb); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-end-appointment-organizer.yaml + + + Office.context.mailbox.item.end.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Appointment ends: ${result.value}`); + }); + + + ... + + + Office.context.mailbox.item.start.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Get start date failed with message ${result.error.message}`); + return; + } + + const end = result.value; // Set end to current start date and time. + end.setDate(end.getDate() + 1); // Set end as 1 day later than start date. + Office.context.mailbox.item.end.setAsync(end, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Set end date failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set end date and time to ${end}`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'end: Time;' + return: + type: '' + - name: enhancedLocation + uid: 'outlook!Office.AppointmentCompose#enhancedLocation:member' + package: outlook! + fullName: enhancedLocation + summary: >- + Gets or sets the locations of the appointment. The `enhancedLocation` property returns an + [EnhancedLocation](xref:outlook!Office.EnhancedLocation:interface) object that provides methods to get, remove, or + add locations on an item. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + Office.context.mailbox.item.enhancedLocation.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to get locations. Error message: ${result.error.message}`); + return; + } + const places = result.value; + if (places && places.length > 0) { + result.value.forEach(function(place) { + console.log(`Location: ${place.displayName} (type: ${place.locationIdentifier.type})`); + if (place.locationIdentifier.type === Office.MailboxEnums.LocationType.Room) { + console.log("Email address: " + place.emailAddress); + } + }); + } else { + console.log("There are no locations."); + } + }); + + + ... + + + const locations = [ + { + id: "Contoso", + type: Office.MailboxEnums.LocationType.Custom + }, + { + id: "room500@test.com", + type: Office.MailboxEnums.LocationType.Room + } + ]; + + Office.context.mailbox.item.enhancedLocation.addAsync(locations, (result) => { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully added locations ${JSON.stringify(locations)}`); + } else { + console.error(`Failed to add locations. Error message: ${result.error.message}`); + } + }); + + + ... + + + const locations = [ + { + id: "Contoso", + type: Office.MailboxEnums.LocationType.Custom + }, + { + id: "room500@test.com", + type: Office.MailboxEnums.LocationType.Room + } + ]; + + Office.context.mailbox.item.enhancedLocation.removeAsync(locations, (result) => { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully removed locations ${JSON.stringify(locations)}`); + } else { + console.error(`Failed to remove locations. Error message: ${result.error.message}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'enhancedLocation: EnhancedLocation;' + return: + type: '' + - name: itemType + uid: 'outlook!Office.AppointmentCompose#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the `item` object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: location + uid: 'outlook!Office.AppointmentCompose#location:member' + package: outlook! + fullName: location + summary: >- + Gets or sets the location of an appointment. The `location` property returns a + [Location](xref:outlook!Office.Location:interface) object that provides methods that are used to get and set the + location of the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + const userContext = { value : 1 }; + + Office.context.mailbox.item.location.getAsync( { context: userContext}, callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const location = asyncResult.value; + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-location-appointment-organizer.yaml + + + Office.context.mailbox.item.location.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Appointment location: ${result.value}`); + }); + + + ... + + + const location = "my office"; + + Office.context.mailbox.item.location.setAsync(location, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set location to ${location}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'location: Location;' + return: + type: '' + - name: notificationMessages + uid: 'outlook!Office.AppointmentCompose#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds a progress indicator to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, + message: "Progress indicator with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an informational notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Non-persistent informational notification message with id = " + id, + icon: "icon1", + persistent: false + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds a persistent information notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Persistent informational notification message with id = " + id, + icon: "icon1", + persistent: true + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + + ... + + + // Replaces a notification message of a given key with another message. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.replaceAsync( + id, + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Notification message with id = " + id + " has been replaced with an informational message.", + icon: "icon2", + persistent: false + }, + handleResult); + + ... + + + // Removes a notification message from the current mail item. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.removeAsync(id, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: optionalAttendees + uid: 'outlook!Office.AppointmentCompose#optionalAttendees:member' + package: outlook! + fullName: optionalAttendees + summary: >- + Provides access to the optional attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the optional + attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on + how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) object + for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.optionalAttendees.setAsync( ['alice@contoso.com', 'bob@contoso.com'] ); + + Office.context.mailbox.item.optionalAttendees.addAsync( ['jason@contoso.com'] ); + + Office.context.mailbox.item.optionalAttendees.getAsync(callback); + + + function callback(asyncResult) { + const arrayOfOptionalAttendeesRecipients = asyncResult.value; + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-optional-attendees-appointment-organizer.yaml + + + Office.context.mailbox.item.optionalAttendees.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptOptionalAttendees = asyncResult.value; + for (let i = 0; i < apptOptionalAttendees.length; i++) { + console.log( + "Optional attendees: " + + apptOptionalAttendees[i].displayName + + " (" + + apptOptionalAttendees[i].emailAddress + + ") - response: " + + apptOptionalAttendees[i].appointmentResponse + ); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailOptional") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.optionalAttendees.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting optional attendees field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'optionalAttendees: Recipients;' + return: + type: '' + - name: organizer + uid: 'outlook!Office.AppointmentCompose#organizer:member' + package: outlook! + fullName: organizer + summary: >- + Gets the organizer for the specified meeting. + + + The `organizer` property returns an [Organizer](xref:outlook!Office.Organizer:interface) object that provides a + method to get the organizer value. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-organizer-appointment-organizer.yaml + + + Office.context.mailbox.item.organizer.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptOrganizer = asyncResult.value; + console.log("Organizer: " + apptOrganizer.displayName + " (" + apptOrganizer.emailAddress + ")"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'organizer: Organizer;' + return: + type: '' + - name: recurrence + uid: 'outlook!Office.AppointmentCompose#recurrence:member' + package: outlook! + fullName: recurrence + summary: >- + Gets or sets the recurrence pattern of an appointment. + + + The `recurrence` property returns a recurrence object for recurring appointments or meetings requests if an item + is a series or an instance in a series. `null` is returned for single appointments and meeting requests of single + appointments. + + + **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. + + + **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a + meeting request of a single appointment and NOT a part of a series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + Office.context.mailbox.item.recurrence.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const recurrence = asyncResult.value; + if (recurrence === null) { + console.log("This is a single appointment."); + } else { + console.log(`Recurrence pattern: ${JSON.stringify(recurrence)}`); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'recurrence: Recurrence;' + return: + type: '' + - name: requiredAttendees + uid: 'outlook!Office.AppointmentCompose#requiredAttendees:member' + package: outlook! + fullName: requiredAttendees + summary: >- + Provides access to the required attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the required + attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on + how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) object + for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.requiredAttendees.setAsync( ['alice@contoso.com', 'bob@contoso.com'] ); + + Office.context.mailbox.item.requiredAttendees.addAsync( ['jason@contoso.com'] ); + + Office.context.mailbox.item.requiredAttendees.getAsync(callback); + + + function callback(asyncResult) { + const arrayOfRequiredAttendeesRecipients = asyncResult.value; + console.log(JSON.stringify(arrayOfRequiredAttendeesRecipients)); + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-required-attendees-appointment-organizer.yaml + + + Office.context.mailbox.item.requiredAttendees.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptRequiredAttendees = asyncResult.value; + for (let i = 0; i < apptRequiredAttendees.length; i++) { + console.log( + "Required attendees: " + + apptRequiredAttendees[i].displayName + + " (" + + apptRequiredAttendees[i].emailAddress + + ") - response: " + + apptRequiredAttendees[i].appointmentResponse + ); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailRequired") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.requiredAttendees.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting required attendees field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'requiredAttendees: Recipients;' + return: + type: '' + - name: sensitivity + uid: 'outlook!Office.AppointmentCompose#sensitivity:member' + package: outlook! + fullName: sensitivity + summary: >- + Gets or sets the [sensitivity level](xref:outlook!Office.Sensitivity:interface) of an appointment. For information + about sensitivity levels, see [Mark your email as Normal, Personal, Private, or + Confidential](https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1). + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-sensitivity-level.yaml + + + Office.context.mailbox.item.sensitivity.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Sensitivity: " + asyncResult.value); + } else { + console.log("Failed to get sensitivity: " + JSON.stringify(asyncResult.error)); + } + }); + + + ... + + + Office.context.mailbox.item.sensitivity.setAsync( + Office.MailboxEnums.AppointmentSensitivityType.Private, + function callback(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Failed to set appointment sensitivity: " + JSON.stringify(asyncResult.error)); + } else { + console.log("Successfully set appointment sensitivity."); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sensitivity: Sensitivity;' + return: + type: '' + - name: sensitivityLabel + uid: 'outlook!Office.AppointmentCompose#sensitivityLabel:member' + package: outlook! + fullName: sensitivityLabel + summary: >- + Gets the object to get or set the [sensitivity label](xref:outlook!Office.SensitivityLabel:interface) of an + appointment. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-label.yaml + + + // This snippet gets the current mail item's sensitivity label. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.mailbox.item.sensitivityLabel.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(asyncResult.value); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sensitivityLabel: SensitivityLabel;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.AppointmentCompose#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac, the + `seriesId` property returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs + to. However, in Outlook on Android and on iOS, `seriesId` returns the REST ID of the parent item. + + + **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item + identifier. The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. Before making + REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + For more details, see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series + items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-series-id.yaml + + + const seriesId = Office.context.mailbox.item.seriesId; + + + if (seriesId === undefined) { + console.log("This is a message that's not a meeting request."); + } else if (seriesId === null) { + console.log("This is a single appointment, a parent series, or a meeting request for a series or single meeting."); + } else { + console.log("This is an instance belonging to series with ID " + seriesId); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: sessionData + uid: 'outlook!Office.AppointmentCompose#sessionData:member' + package: outlook! + fullName: sessionData + summary: |- + Manages the [SessionData](xref:outlook!Office.SessionData:interface) of an item in Compose mode. + + **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.getAllAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("The sessionData is " + JSON.stringify(asyncResult.value)); + } else { + console.log("Failed to get all sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sessionData: SessionData;' + return: + type: '' + - name: start + uid: 'outlook!Office.AppointmentCompose#start:member' + package: outlook! + fullName: start + summary: >- + Gets or sets the date and time that the appointment is to begin. + + + The `start` property is a [Time](xref:outlook!Office.Time:interface) object expressed as a Coordinated Universal + Time (UTC) date and time value. You can use the `convertToLocalClientTime` method to convert the value to the + client's local date and time. + + + When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method + to convert the local time on the client to UTC for the server. + + + **Important**: In the Windows client, you can't use this property to update the start of a recurrence. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-start-appointment-organizer.yaml + + + Office.context.mailbox.item.start.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Appointment starts: ${result.value}`); + }); + + + ... + + + const start = new Date(); // Represents current date and time. + + start.setDate(start.getDate() + 2); // Add 2 days to current date. + + Office.context.mailbox.item.start.setAsync(start, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set start date and time to ${start}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'start: Time;' + return: + type: '' + - name: subject + uid: 'outlook!Office.AppointmentCompose#subject:member' + package: outlook! + fullName: subject + summary: |- + Gets or sets the description that appears in the subject field of an item. + + The `subject` property gets or sets the entire subject of the item, as sent by the email server. + + The `subject` property returns a `Subject` object that provides methods to get and set the subject. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-subject-compose.yaml + + + Office.context.mailbox.item.subject.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Subject: ${result.value}`); + }); + + + ... + + + let subject = "Hello World!"; + + Office.context.mailbox.item.subject.setAsync(subject, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set subject to ${subject}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'subject: Subject;' + return: + type: '' +methods: + - name: 'addFileAttachmentAsync(uri, attachmentName, options, callback)' + uid: 'outlook!Office.AppointmentCompose#addFileAttachmentAsync:member(1)' + package: outlook! + fullName: 'addFileAttachmentAsync(uri, attachmentName, options, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the + compose form. + remarks: >- + \[ [API set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new + Outlook on Windows](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: + Bearer` header to this action (whether using this API or the Outlook UI). To work around this issue, use the + `addFileAttachmentFromBase64` API introduced with requirement set 1.8. + + + - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't + return a `Cache-Control` header that specifies `no-cache`, `no-store`, or similar options in the + HTTP response. However, when you're developing the add-in and making changes to files, caching can prevent you + from seeing your changes. We recommend using `Cache-Control` headers during development. + + + - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + const attachmentUrl = $("#attachmentUrl") + .val() + .toString(); + Office.context.mailbox.item.addFileAttachmentAsync( + attachmentUrl, + getFileName(attachmentUrl), + { isInline: false }, + (result) => { + console.log(result); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: + boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: uri + description: >- + The URI that provides the location of the file to attach to the message or appointment. The maximum length + is 2048 characters. + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `isInline`: If true, indicates + that the attachment will be shown inline as an image in the message body and won't be displayed in the + attachment list. + type: ' & { isInline: boolean }' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentAsync(uri, attachmentName, callback)' + uid: 'outlook!Office.AppointmentCompose#addFileAttachmentAsync:member(2)' + package: outlook! + fullName: 'addFileAttachmentAsync(uri, attachmentName, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the + compose form. + remarks: >- + \[ [API set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new + Outlook on Windows](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: + Bearer` header to this action (whether using this API or the Outlook UI). To work around this issue, use the + `addFileAttachmentFromBase64` API introduced with requirement set 1.8. + + + - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't + return a `Cache-Control` header that specifies `no-cache`, `no-store`, or similar options in the + HTTP response. However, when you're developing the add-in and making changes to files, caching can prevent you + from seeing your changes. We recommend using `Cache-Control` headers during development. + + + - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: uri + description: >- + The URI that provides the location of the file to attach to the message or appointment. The maximum length + is 2048 characters. + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentFromBase64Async(base64File, attachmentName, options, callback)' + uid: 'outlook!Office.AppointmentCompose#addFileAttachmentFromBase64Async:member(1)' + package: outlook! + fullName: 'addFileAttachmentFromBase64Async(base64File, attachmentName, options, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the + item in the compose form. This method returns the attachment identifier in the `asyncResult.value` object. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL + prefix then send the rest of the string to this API. For example, if the full string is represented by + `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you + must first get the current item body using the + [Office.context.mailbox.item.body.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1)) + method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't + render in the body once it's inserted. For further guidance, see [Attach a + file](https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + const base64String = + "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsSAAALEgHS3X78AAACRUlEQVRYw82XzXHbMBCFP2F8tzsQc8Ixyh0zoiuIXIGdCsxUYKqC0B04FdiuwMoM7mGOOIXqQGoAymXhgSX+itJM9kIRFLAP+3YXD5Pdbscx5oxaAIW8Ztr6l2PWmQwF4IyaieP53qdfAqQ8CwBn1JU4vpWhrbxXQA5MZfynANmcDIAzKgcy4FKGXsVJFf3nLgKyBQptfT4KQMRz2N0fcbxqmRMDWXflx0VPnrdArq0vekQ1Dv0UeHZGNebHhwjU8AzwKM43RyZnbAf58Q6ghudeWd0Aus0+5EcMIIRi3beua0D3Nm39BEAx3i7HTK4DEBJn5YxKOnaRA5+ErpMBWMpzDvx1RuXCcxOISlufAjfC7zgAsqsvUvMAD0ApPaEtGi9AIlUzKgJo60tt/SyKRkzLrAXERluf7W1gOICWaMyB386oooOWsIHvXbSoHuUSFovtHqicUVnH3EJoeT0aQEf5/XBGlc6otIOWBXAtPeZkAIJ9Bt6cUU9tZautX2nrk3MACHYr1ZKProKRtDw4o8pzAPjWo+NtpXTTvoteDDg8noDAcwbcRedAkGdFXyk2GEDcegVAFp2gyVDHjRQ4o6q2smoqtR5Hd+qMqtoALCWUUymr1m43QMZfOaMK4C0SrMsDANJ2E5FNcbdbjHC+ENl+H0myJFbLtaq4Rt8dyPBYRQV1E40nMv9rl7xrOw3DGb+Whcqu3i/OM6CUOWvgRlufNmnLYy4m77uJI7AXtdNcTDrU71LEyv7v01/N/ovL6bmu5/8A1tNWZldH0W4AAAAASUVORK5CYII="; + Office.context.mailbox.item.addFileAttachmentFromBase64Async( + base64String, + "logo.png", + { isInline: false }, + (result) => { + console.log(result); + } + ); + + + ... + + + // Set the signature for the current item with inline image. + + const modIcon1Base64 = + "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDRDMxMDg1MjBCNDZFMTExODE2MkM1RUI2M0M4MDYxRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMTUxQjgyRjQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMTUxQjgyRTQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgV2luZG93cyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQxMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkNEMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+uC/WfAAAAehJREFUeNpilCzfwEAEkAbiECA2A2J1IOaHin8E4ptAfBaIVwLxU0IGMRKw0B6IW4DYhoE4cASIK6E0VsCEQ1wUiNcB8QESLGOAqj0MxBuhZhBloS4QnwHiQAbygR/UDF1CFupCXSjHQDmQg5qli8tCUBBsQUoQ1AD8UDNFsVk4n0o+w+bT+egWglKjNymmeGhLkqLcG2oHAwtUoIuQDj5OVgZPLUmwRe5aEmAxqYqNpFgKssOcCeplM0KqdST5GfpDDRm0JfkYrj3/SE7QguyQY4ImYYLgCtAS10kHGMw6dzNsv/qC7OwCClJXYlR++v6b4er3j5QmIFcmaNlIL6AOslCIjhYKMTHQGTBBqxh6gXcgC6/R0cKbIAv30dHCfaAKGJTxHxJSqS3Fz9DkowNmywpyMcgA8fF7b8D8VWcfM6w8+4gYC+VB+RCk8hSh0gaUD4/dewvlvUWRe/z+GzGWgex4BGtiOAHxXhoHpzMoSGHZAhSPW2lo2VZYWkHOh4nEtLrIAE+hZmNUwK+B2BOIv1PRsu9QM1/jatNcBtVZ0IREKXgENesyoVYbzNIdFFi2A5tl+NqlL6BB4QBNzsSCU1A9nlAzMAALAQMOQl0qB23qWwKxIlIrDBQ394H4OBCvISYqAAIMACVibHDqsO7zAAAAAElFTkSuQmCC"; + + Office.context.mailbox.item.addFileAttachmentFromBase64Async( + modIcon1Base64, + "myImage.png", + { isInline: true }, + function(result) { + if (result.status == Office.AsyncResultStatus.Succeeded) { + const signature = $("#signature").val() + ""; + console.log(`Setting signature to "${signature}".`); + Office.context.mailbox.item.body.setSignatureAsync( + signature, + { coercionType: "html" }, + function(asyncResult) { + console.log(`setSignatureAsync: ${asyncResult.status}`); + } + ); + } else { + console.error(`addFileAttachmentFromBase64Async: ${result.error}`); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: + Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: base64File + description: >- + The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the + encoded string is 27,892,122 characters (about 25 MB). + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `isInline`: If true, indicates + that the attachment will be shown inline as an image in the message body and won't be displayed in the + attachment list. + type: ' & { isInline: boolean }' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentFromBase64Async(base64File, attachmentName, callback)' + uid: 'outlook!Office.AppointmentCompose#addFileAttachmentFromBase64Async:member(2)' + package: outlook! + fullName: 'addFileAttachmentFromBase64Async(base64File, attachmentName, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the + item in the compose form. This method returns the attachment identifier in the `asyncResult.value` object. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL + prefix then send the rest of the string to this API. For example, if the full string is represented by + `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you + must first get the current item body using the + [Office.context.mailbox.item.body.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1)) + method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't + render in the body once it's inserted. For further guidance, see [Attach a + file](https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file). + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: base64File + description: >- + The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the + encoded string is 27,892,122 characters (about 25 MB). + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, options, callback)' + uid: 'outlook!Office.AppointmentCompose#addHandlerAsync:member(1)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, options, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + function myHandlerFunction(eventarg) { + if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = eventarg.attachmentDetails; + console.log("Event Fired and Attachment Added!"); + getAttachmentContentAsync(attachment.id, options, callback); + } + } + + + Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, callback)' + uid: 'outlook!Office.AppointmentCompose#addHandlerAsync:member(2)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addItemAttachmentAsync(itemId, attachmentName, options, callback)' + uid: 'outlook!Office.AppointmentCompose#addItemAttachmentAsync:member(1)' + package: outlook! + fullName: 'addItemAttachmentAsync(itemId, attachmentName, options, callback)' + summary: >- + Adds an Exchange item, such as a message, as an attachment to the message or appointment. + + + The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the + compose form. If you specify a callback function, the method is called with one parameter, `asyncResult`, + which contains either the attachment identifier or a code that indicates any error that occurred while attaching + the item. You can use the `options` parameter to pass state information to the callback function, if needed. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + If your Office Add-in is running in Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `addItemAttachmentAsync` method can attach items to items other than the item that you're editing. However, this + isn't supported and isn't recommended. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + #### Examples + + + ```TypeScript + + // The following example adds an existing Outlook item as an attachment + + // with the name "My Attachment". + + function addAttachment() { + // EWS ID of item to attach (shortened for readability). + const itemId = "AAMkADI1...AAA="; + + // The values in asyncContext can be accessed in the callback. + const options = { asyncContext: { var1: 1, var2: 2 } }; + + Office.context.mailbox.item.addItemAttachmentAsync(itemId, "My Attachment", options, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to add attachment: " + result.error.message); + return; + } + + console.log("Attachment added successfully."); + console.log("var1: " + result.asyncContext.var1); + console.log("var2: " + result.asyncContext.var2); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange identifier of the item to attach. The maximum length is 100 characters. + type: any + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If adding the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addItemAttachmentAsync(itemId, attachmentName, callback)' + uid: 'outlook!Office.AppointmentCompose#addItemAttachmentAsync:member(2)' + package: outlook! + fullName: 'addItemAttachmentAsync(itemId, attachmentName, callback)' + summary: >- + Adds an Exchange item, such as a message, as an attachment to the message or appointment. + + + The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the + compose form. If you specify a callback function, the method is called with one parameter, `asyncResult`, + which contains either the attachment identifier or a code that indicates any error that occurred while attaching + the item. You can use the `options` parameter to pass state information to the callback function, if needed. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + If your Office Add-in is running in Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `addItemAttachmentAsync` method can attach items to items other than the item that you're editing. However, this + isn't supported and isn't recommended. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + isPreview: false + isDeprecated: false + syntax: + content: >- + addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange identifier of the item to attach. The maximum length is 100 characters. + type: any + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If adding the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: close() + uid: 'outlook!Office.AppointmentCompose#close:member(1)' + package: outlook! + fullName: close() + summary: >- + Closes the current item that is being composed. + + + The behavior of the `close` method depends on the current state of the item being composed. If the item has + unsaved changes, the client prompts the user to save, discard, or close the action. + + + In Outlook on Windows (classic) and on Mac, the `close` method has no effect on a reply in the Reading Pane. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), if the item is an + appointment and it has previously been saved using `saveAsync`, the user is prompted to save, discard, or + cancel even if no changes have occurred since the item was last saved. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/25-item-save-and-close/close.yaml + + + Office.context.mailbox.item.close(); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'close(): void;' + return: + type: void + description: '' + - name: 'disableClientSignatureAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#disableClientSignatureAsync:member(1)' + package: outlook! + fullName: 'disableClientSignatureAsync(options, callback)' + summary: >- + Disables the Outlook client signature. + + + In Outlook on Windows (classic) and on Mac, this API sets the signature under the "New Message" and + "Replies/Forwards" sections for the sending account to "(none)", effectively disabling the signature. In Outlook + on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API disables the + signature option for new mails, replies, and forwards. If the signature is selected, this API call disables it. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Disable the client signature. + + Office.context.mailbox.item.disableClientSignatureAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("disableClientSignatureAsync succeeded"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: disableClientSignatureAsync(callback) + uid: 'outlook!Office.AppointmentCompose#disableClientSignatureAsync:member(2)' + package: outlook! + fullName: disableClientSignatureAsync(callback) + summary: >- + Disables the Outlook client signature. + + + In Outlook on Windows (classic) and on Mac, this API sets the signature under the "New Message" and + "Replies/Forwards" sections for the sending account to "(none)", effectively disabling the signature. In Outlook + on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API disables the + signature option for new mails, replies, and forwards. If the signature is selected, this API call disables it. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: 'disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.AppointmentCompose#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachment-content.yaml + + + // Gets the attachments of the current message or appointment in compose mode. + + const options = { asyncContext: { currentItem: item } }; + + // The getAttachmentsAsync call can only be used in compose mode. + + item.getAttachmentsAsync(options, callback); + + + function callback(result) { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + if (result.value.length <= 0) { + console.log("Mail item has no attachments."); + return; + } + + for (let i = 0; i < result.value.length; i++) { + // Log the attachment type and its contents to the console. + result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback); + } + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.AppointmentCompose#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentsAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#getAttachmentsAsync:member(1)' + package: outlook! + fullName: 'getAttachmentsAsync(options, callback)' + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + Office.context.mailbox.item.getAttachmentsAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + if (result.value.length > 0) { + for (let i = 0; i < result.value.length; i++) { + const attachment = result.value[i]; + let attachmentType; + switch (attachment.attachmentType) { + case Office.MailboxEnums.AttachmentType.Cloud: + attachmentType = "Attachment is stored in a cloud location"; + break; + case Office.MailboxEnums.AttachmentType.File: + attachmentType = "Attachment is a file"; + break; + case Office.MailboxEnums.AttachmentType.Item: + attachmentType = "Attachment is an Exchange item"; + break; + } + console.log( + "ID: " + + attachment.id + + "\n" + + "Type: " + + attachmentType + + "\n" + + "Name: " + + attachment.name + + "\n" + + "Size: " + + attachment.size + + "\n" + + "isInline: " + + attachment.isInline + ); + } + } else { + console.log("No attachments on this message."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAttachmentsAsync(callback) + uid: 'outlook!Office.AppointmentCompose#getAttachmentsAsync:member(2)' + package: outlook! + fullName: getAttachmentsAsync(callback) + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: 'getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Get the initialization context (if present). + + Office.context.mailbox.item.getInitializationContextAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + if (asyncResult.value.length > 0) { + // The value is a string, parse to an object. + const context = JSON.parse(asyncResult.value); + // Do something with context. + } else { + // Empty context, treat as no context. + } + } else { + // Handle the error. + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.AppointmentCompose#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getItemIdAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#getItemIdAsync:member(1)' + package: outlook! + fullName: 'getItemIdAsync(options, callback)' + summary: >- + Asynchronously gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of a saved item. + + + When invoked, this method returns the item ID via the callback function. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware + that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item + is synced, the item ID isn't recognized and using it returns an error. + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + isPreview: false + isDeprecated: false + syntax: + content: >- + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` + property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getItemIdAsync(callback) + uid: 'outlook!Office.AppointmentCompose#getItemIdAsync:member(2)' + package: outlook! + fullName: getItemIdAsync(callback) + summary: >- + Asynchronously gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of a saved item. + + + When invoked, this method returns the item ID via the callback function. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware + that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item + is synced, the item ID isn't recognized and using it returns an error. + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/item-id-compose.yaml + + + Office.context.mailbox.item.getItemIdAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`getItemIdAsync failed with message: ${result.error.message}`); + return; + } + + console.log(result.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` + property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getSelectedDataAsync(coercionType, options, callback)' + uid: 'outlook!Office.AppointmentCompose#getSelectedDataAsync:member(1)' + package: outlook! + fullName: 'getSelectedDataAsync(coercionType, options, callback)' + summary: >- + Asynchronously returns selected data from the subject or body of a message. + + + If there is no selection but the cursor is in the body or subject, the method returns an empty string for the + selected data. If a field other than the body or subject is selected, the method returns the `InvalidSelection` + error. + + + To access the selected data from the callback function, call `asyncResult.value.data`. To access the + `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be + either `body` or `subject`. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Get selected data. + + Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, { option1: "option1"}, getCallback); + + + function getCallback(asyncResult) { + const text = asyncResult.value.data; + const prop = asyncResult.value.sourceProperty; + + console.log(`Selected text in ${prop}: ${text}`); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getSelectedDataAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, + callback: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: coercionType + description: >- + Requests a format for the data. If `Text`, the method returns the plain text as a string, removing + any HTML tags present. If `HTML`, the method returns the selected text, whether it is plaintext or + HTML. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <any>) => void' + return: + type: void + description: The selected data as a string with format determined by `coercionType`. + - name: 'getSelectedDataAsync(coercionType, callback)' + uid: 'outlook!Office.AppointmentCompose#getSelectedDataAsync:member(2)' + package: outlook! + fullName: 'getSelectedDataAsync(coercionType, callback)' + summary: >- + Asynchronously returns selected data from the subject or body of a message. + + + If there is no selection but the cursor is in the body or subject, the method returns an empty string for the + selected data. If a field other than the body or subject is selected, the method returns the `InvalidSelection` + error. + + + To access the selected data from the callback function, call `asyncResult.value.data`. To access the + `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be + either `body` or `subject`. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/get-selected-data.yaml + + + Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const text = asyncResult.value.data; + const prop = asyncResult.value.sourceProperty; + console.log("Selected text in " + prop + ": " + text); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getSelectedDataAsync(coercionType: Office.CoercionType | string, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: coercionType + description: >- + Requests a format for the data. If `Text`, the method returns the plain text as a string, removing + any HTML tags present. If `HTML`, the method returns the selected text, whether it is plaintext or + HTML. + type: ' | string' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <string>) => void' + return: + type: void + description: The selected data as a string with format determined by `coercionType`. + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.AppointmentCompose#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml + + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + const sharedProperties = result.value; + console.log(`Owner: ${sharedProperties.owner}`); + console.log(`Permissions: ${sharedProperties.delegatePermissions}`); + console.log(`Target mailbox: ${sharedProperties.targetMailbox}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'isClientSignatureEnabledAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#isClientSignatureEnabledAsync:member(1)' + package: outlook! + fullName: 'isClientSignatureEnabledAsync(options, callback)' + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic) and on Mac, returns `true` if the default signature for new messages, replies, or + forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), returns `true` if the + signature is enabled for compose types `newMail`, `reply`, or `forward`. If the settings + are set to "(none)" in Outlook on Windows (classic) or on Mac or disabled in Outlook on the web or new Outlook on + Windows, returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Check if the client signature is currently enabled. + + Office.context.mailbox.item.isClientSignatureEnabledAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("isClientSignatureEnabledAsync succeeded with result: " + asyncResult.value); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: isClientSignatureEnabledAsync(callback) + uid: 'outlook!Office.AppointmentCompose#isClientSignatureEnabledAsync:member(2)' + package: outlook! + fullName: isClientSignatureEnabledAsync(callback) + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic) and on Mac, returns `true` if the default signature for new messages, replies, or + forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), returns `true` if the + signature is enabled for compose types `newMail`, `reply`, or `forward`. If the settings + are set to "(none)" in Outlook on Windows (classic) or on Mac or disabled in Outlook on the web or new Outlook on + Windows, returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: 'isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.AppointmentCompose#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get, set, save, and remove custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/15-item-custom-properties/load-set-get-save.yaml + + + Office.context.mailbox.item.loadCustomPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`loadCustomPropertiesAsync failed with message ${result.error.message}`); + return; + } + + customProps = result.value; + console.log("Loaded the CustomProperties object."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'removeAttachmentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.AppointmentCompose#removeAttachmentAsync:member(1)' + package: outlook! + fullName: 'removeAttachmentAsync(attachmentId, options, callback)' + summary: >- + Removes an attachment from a message or appointment. + + + The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. As a best + practice, you should use the attachment identifier to remove an attachment only if the same mail app has added + that attachment in the same session. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. To remove + an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + Use the [Office.Body](https://learn.microsoft.com/javascript/api/outlook/office.body) APIs to get and set the body + of an item. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + Office.context.mailbox.item.removeAttachmentAsync( + $("#attachmentId") + .val() + .toString(), + (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + console.log(`Attachment removed successfully.`); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAttachmentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: >- + The identifier of the attachment to remove. The maximum string length of the `attachmentId` is 200 + characters in Outlook on the web and on Windows (new and classic). + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` + property will contain an error code with the reason for the failure. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAttachmentAsync(attachmentId, callback)' + uid: 'outlook!Office.AppointmentCompose#removeAttachmentAsync:member(2)' + package: outlook! + fullName: 'removeAttachmentAsync(attachmentId, callback)' + summary: >- + Removes an attachment from a message or appointment. + + + The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. As a best + practice, you should use the attachment identifier to remove an attachment only if the same mail app has added + that attachment in the same session. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. To remove + an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + Use the [Office.Body](https://learn.microsoft.com/javascript/api/outlook/office.body) APIs to get and set the body + of an item. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): + void; + parameters: + - id: attachmentId + description: >- + The identifier of the attachment to remove. The maximum string length of the `attachmentId` is 200 + characters in Outlook on the web and on Windows (new and classic). + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` + property will contain an error code with the reason for the failure. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, options, callback)' + uid: 'outlook!Office.AppointmentCompose#removeHandlerAsync:member(1)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, options, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, callback)' + uid: 'outlook!Office.AppointmentCompose#removeHandlerAsync:member(2)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.removeHandlerAsync(Office.EventType.InfobarClicked, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to remove event handler: " + asyncResult.error.message); + return; + } + + console.log("Event handler removed successfully."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'saveAsync(options, callback)' + uid: 'outlook!Office.AppointmentCompose#saveAsync:member(1)' + package: outlook! + fullName: 'saveAsync(options, callback)' + summary: >- + Asynchronously saves an item. + + + Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is + saved as a normal appointment on the user's calendar. For new appointments that haven't been saved before, no + invitation is sent. For existing appointments, an update is sent to added or removed attendees. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook + is in cached mode, it may take some time before the item is actually synced to the server. Until the item is + synced, using the item ID will return an error. + + + - In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. Otherwise, the `saveAsync` + method fails when called from a meeting in compose mode. For a workaround, see [Cannot save a meeting as a draft + in Outlook for Mac by using Office JS + API](https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac). + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/25-item-save-and-close/save.yaml + + + Office.context.mailbox.item.saveAsync(function (result) { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`saveAsync succeeded, itemId is ${result.value}`); + } + else { + console.error(`saveAsync failed with message ${result.error.message}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS appointment ID is + returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: saveAsync(callback) + uid: 'outlook!Office.AppointmentCompose#saveAsync:member(2)' + package: outlook! + fullName: saveAsync(callback) + summary: >- + Asynchronously saves an item. + + + Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is + saved as a normal appointment on the user's calendar. For new appointments that haven't been saved before, no + invitation is sent. For existing appointments, an update is sent to added or removed attendees. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook + is in cached mode, it may take some time before the item is actually synced to the server. Until the item is + synced, using the item ID will return an error. + + + - In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. Otherwise, the `saveAsync` + method fails when called from a meeting in compose mode. For a workaround, see [Cannot save a meeting as a draft + in Outlook for Mac by using Office JS + API](https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac). + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.saveAsync( + function callback(result) { + // Process the result. + }); + + // The following is an example of the + + // `result` parameter passed to the + + // callback function. The `value` + + // property contains the item ID of + + // the item. + + { + "value": "AAMkADI5...AAA=", + "status": "succeeded" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS appointment ID is + returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, options, callback)' + uid: 'outlook!Office.AppointmentCompose#setSelectedDataAsync:member(1)' + package: outlook! + fullName: 'setSelectedDataAsync(data, options, callback)' + summary: >- + Asynchronously inserts data into the body or subject of a message. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of + the item, or, if text is selected in the editor, it replaces the selected text. If the cursor is not in the body + or subject field, an error is returned. After insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.setSelectedDataAsync("Hello World!", { coercionType : "html" }); + + ``` + + ```TypeScript + + Office.context.mailbox.item.setSelectedDataAsync("Hello World!"); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/set-selected-data.yaml + + + Office.context.mailbox.item.setSelectedDataAsync("Replaced", function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Selected text has been updated successfully."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: >- + The data to be inserted. Data is not to exceed 1,000,000 characters. If more than 1,000,000 characters are + passed in, an `ArgumentOutOfRange` exception is thrown. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: If text, the + current style is applied in Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac. + If the field is an HTML editor, only the text data is inserted, even if the data is HTML. If the data is + HTML and the field supports HTML (the subject doesn't), the current style is applied in Outlook on the web + and new Outlook on Windows. The default style is applied in Outlook on Windows (classic) and on Mac. If the + field is a text field, an `InvalidDataFormat` error is returned. If `coercionType` is not set, the result + depends on the field: if the field is HTML then HTML is used; if the field is text, then plain text is used. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, callback)' + uid: 'outlook!Office.AppointmentCompose#setSelectedDataAsync:member(2)' + package: outlook! + fullName: 'setSelectedDataAsync(data, callback)' + summary: >- + Asynchronously inserts data into the body or subject of a message. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of + the item, or, if text is selected in the editor, it replaces the selected text. If the cursor is not in the body + or subject field, an error is returned. After insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Organizer + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: 'setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: >- + The data to be inserted. Data is not to exceed 1,000,000 characters. If more than 1,000,000 characters are + passed in, an `ArgumentOutOfRange` exception is thrown. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentform.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentform.yml new file mode 100644 index 0000000000..10116003fa --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentform.yml @@ -0,0 +1,317 @@ +### YamlMime:TSType +name: Office.AppointmentForm +uid: 'outlook!Office.AppointmentForm:interface' +package: outlook! +fullName: Office.AppointmentForm +summary: The `AppointmentForm` object is used to access the currently selected appointment. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +properties: + - name: body + uid: 'outlook!Office.AppointmentForm#body:member' + package: outlook! + fullName: body + summary: Gets an object that provides methods for manipulating the body of an item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body | string;' + return: + type: ' | string' + - name: end + uid: 'outlook!Office.AppointmentForm#end:member' + package: outlook! + fullName: end + summary: >- + Gets or sets the date and time that the appointment is to end. + + + The `end` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the + `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + + + *Read mode* + + + The `end` property returns a `Date` object. + + + *Compose mode* + + + The `end` property returns a `Time` object. + + + When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to + convert the local time on the client to UTC for the server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'end: Time | Date;' + return: + type: ' | Date' + - name: location + uid: 'outlook!Office.AppointmentForm#location:member' + package: outlook! + fullName: location + summary: >- + Gets or sets the location of an appointment. + + + *Read mode* + + + The `location` property returns a string that contains the location of the appointment. + + + *Compose mode* + + + The `location` property returns a `Location` object that provides methods that are used to get and set the + location of the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'location: Location | string;' + return: + type: ' | string' + - name: optionalAttendees + uid: 'outlook!Office.AppointmentForm#optionalAttendees:member' + package: outlook! + fullName: optionalAttendees + summary: >- + Provides access to the optional attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + *Read mode* + + + The `optionalAttendees` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each optional attendee to the + meeting. Collection size limits: + + + - Web browser, new Mac UI, Android: No limit + + + - Windows: 500 members + + + - Classic Mac UI: 100 members + + + *Compose mode* + + + The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the optional + attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on + how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) object + for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'optionalAttendees: Recipients[] | EmailAddressDetails[];' + return: + type: >- + [] | [] + - name: requiredAttendees + uid: 'outlook!Office.AppointmentForm#requiredAttendees:member' + package: outlook! + fullName: requiredAttendees + summary: >- + Provides access to the required attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + *Read mode* + + + The `requiredAttendees` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each required attendee to the + meeting. Collection size limits: + + + - Web browser, new Mac UI, Android: No limit + + + - Windows: 500 members + + + - Classic Mac UI: 100 members + + + *Compose mode* + + + The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the required + attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on + how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) object + for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'requiredAttendees: Recipients[] | EmailAddressDetails[];' + return: + type: >- + [] | [] + - name: resources + uid: 'outlook!Office.AppointmentForm#resources:member' + package: outlook! + fullName: resources + summary: >- + Provides access to the resources of an event. Returns an array of strings containing the resources required for + the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'resources: string[];' + return: + type: 'string[]' + - name: start + uid: 'outlook!Office.AppointmentForm#start:member' + package: outlook! + fullName: start + summary: >- + Gets or sets the date and time that the appointment is to begin. + + + The `start` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the + `convertToLocalClientTime` method to convert the value to the client's local date and time. + + + *Read mode* + + + The `start` property returns a `Date` object. + + + *Compose mode* + + + The `start` property returns a `Time` object. + + + When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method + to convert the local time on the client to UTC for the server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'start: Time | Date;' + return: + type: ' | Date' + - name: subject + uid: 'outlook!Office.AppointmentForm#subject:member' + package: outlook! + fullName: subject + summary: >- + Gets or sets the description that appears in the subject field of an item. + + + The `subject` property gets or sets the entire subject of the item, as sent by the email server. + + + *Read mode* + + + The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading + prefixes such as RE: and FW:. + + + *Compose mode* + + + The `subject` property returns a `Subject` object that provides methods to get and set the subject. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'subject: Subject | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentread.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentread.yml new file mode 100644 index 0000000000..4672cef06b --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmentread.yml @@ -0,0 +1,2917 @@ +### YamlMime:TSType +name: Office.AppointmentRead +uid: 'outlook!Office.AppointmentRead:interface' +package: outlook! +fullName: Office.AppointmentRead +summary: >- + The appointment attendee mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Parent interfaces: + + + - [ItemRead](xref:outlook!Office.ItemRead:interface) + + + - [Appointment](xref:outlook!Office.Appointment:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachments + uid: 'outlook!Office.AppointmentRead#attachments:member' + package: outlook! + fullName: attachments + summary: Gets the item's attachments as an array. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not + returned. For more information, see [Blocked attachments in + Outlook](https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519). + + + #### Examples + + + ```TypeScript + + // The following code builds an HTML string with details of all attachments on the current item. + + const item = Office.context.mailbox.item; + + let outputString = ""; + + + if (item.attachments.length > 0) { + for (let i = 0 ; i < item.attachments.length ; i++) { + const attachment = item.attachments[i]; + outputString += "
" + i + ". Name: "; + outputString += attachment.name; + outputString += "
ID: " + attachment.id; + outputString += "
contentType: " + attachment.contentType; + outputString += "
size: " + attachment.size; + outputString += "
attachmentType: " + attachment.attachmentType; + outputString += "
isInline: " + attachment.isInline; + } + } + + + console.log(outputString); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachments-read.yaml + + + const attachments = Office.context.mailbox.item.attachments; + + console.log(attachments); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'attachments: AttachmentDetails[];' + return: + type: '[]' + - name: body + uid: 'outlook!Office.AppointmentRead#body:member' + package: outlook! + fullName: body + summary: Gets an object that provides methods for manipulating the body of an item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // This example gets the body of the item as plain text. + + Office.context.mailbox.item.body.getAsync( + Office.CoercionType.Text, + { asyncContext: "This is passed to the callback" }, + (result) => { + // Do something with the result. + } + ); + + + // The following is an example of the result parameter passed to the callback function. + + { + "value": "TEXT of whole body (including message threads that appear below the current body)", + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.AppointmentRead#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods for managing the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Categories assigned to this item:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + // Note: In order for you to successfully add a category, + + // it must be in the mailbox categories master list. + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const masterCategories = asyncResult.value; + if (masterCategories && masterCategories.length > 0) { + // Grab the first category from the master list. + const categoryToAdd = [masterCategories[0].displayName]; + Office.context.mailbox.item.categories.addAsync(categoryToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully assigned category '${categoryToAdd}' to item.`); + } else { + console.log("categories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories in the master list on this mailbox. You can add categories using Office.context.mailbox.masterCategories.addAsync."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + // Grab the first category assigned to this item. + const categoryToRemove = [categories[0].displayName]; + Office.context.mailbox.item.categories.removeAsync(categoryToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully unassigned category '${categoryToRemove}' from this item.`); + } else { + console.log("categories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: dateTimeCreated + uid: 'outlook!Office.AppointmentRead#dateTimeCreated:member' + package: outlook! + fullName: dateTimeCreated + summary: Gets the date and time that an item was created. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-date-time-created-read.yaml + + + console.log(`Creation date and time: ${Office.context.mailbox.item.dateTimeCreated}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeCreated: Date;' + return: + type: Date + - name: dateTimeModified + uid: 'outlook!Office.AppointmentRead#dateTimeModified:member' + package: outlook! + fullName: dateTimeModified + summary: Gets the date and time that an item was last modified. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on + supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-date-time-modified-read.yaml + + + console.log(`Date and time item last modified: ${Office.context.mailbox.item.dateTimeModified}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeModified: Date;' + return: + type: Date + - name: end + uid: 'outlook!Office.AppointmentRead#end:member' + package: outlook! + fullName: end + summary: >- + Gets the date and time that the appointment is to end. + + + The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You can + use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + + + When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to + convert the local time on the client to UTC for the server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-end-read.yaml + + + console.log(`Appointment ends: ${Office.context.mailbox.item.end}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'end: Date;' + return: + type: Date + - name: enhancedLocation + uid: 'outlook!Office.AppointmentRead#enhancedLocation:member' + package: outlook! + fullName: enhancedLocation + summary: >- + Gets the locations of an appointment. + + + The `enhancedLocation` property returns an [EnhancedLocation](xref:outlook!Office.EnhancedLocation:interface) + object that allows you to get the set of locations (each represented by a + [LocationDetails](xref:outlook!Office.LocationDetails:interface) object) associated with the appointment. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + Office.context.mailbox.item.enhancedLocation.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to get locations. Error message: ${result.error.message}`); + return; + } + const places = result.value; + if (places && places.length > 0) { + result.value.forEach(function(place) { + console.log(`Location: ${place.displayName} (type: ${place.locationIdentifier.type})`); + if (place.locationIdentifier.type === Office.MailboxEnums.LocationType.Room) { + console.log("Email address: " + place.emailAddress); + } + }); + } else { + console.log("There are no locations."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'enhancedLocation: EnhancedLocation;' + return: + type: '' + - name: itemClass + uid: 'outlook!Office.AppointmentRead#itemClass:member' + package: outlook! + fullName: itemClass + summary: >- + Gets the Exchange Web Services item class of the selected appointment. + + + Returns `IPM.Appointment` for non-recurring appointments and `IPM.Appointment.Occurrence` for recurring + appointments. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: You can create custom classes that extend a default item class. For example, + `IPM.Appointment.Contoso`. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-class-read.yaml + + + console.log(`Item class: ${Office.context.mailbox.item.itemClass}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemClass: string;' + return: + type: string + - name: itemId + uid: 'outlook!Office.AppointmentRead#itemId:member' + package: outlook! + fullName: itemId + summary: >- + Gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of the current item. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - The `itemId` property isn't available in compose mode. If an item identifier is required, the + `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the + item identifier in the `asyncResult.value` parameter in the callback function. If the item is already saved, you + can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + #### Examples + + + ```TypeScript + + // The following code checks for the presence of an item + + // identifier. If the `itemId` property returns `null` or + + // `undefined`, it saves the item to the store and gets the + + // item identifier from the asynchronous result. + + // **Important**: `saveAsync` was introduced with requirement set 1.3 + + // so you can't get the `itemId` in Compose mode in earlier sets. + + let itemId = Office.context.mailbox.item.itemId; + + if (itemId === null || itemId == undefined) { + Office.context.mailbox.item.saveAsync(function(result) { + itemId = result.value; + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemId: string;' + return: + type: string + - name: itemType + uid: 'outlook!Office.AppointmentRead#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: location + uid: 'outlook!Office.AppointmentRead#location:member' + package: outlook! + fullName: location + summary: |- + Gets the location of an appointment. + + The `location` property returns a string that contains the location of the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + const location = Office.context.mailbox.item.location; + + console.log("location: " + location); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-location-read.yaml + + + console.log(`Appointment location: ${Office.context.mailbox.item.location}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'location: string;' + return: + type: string + - name: normalizedSubject + uid: 'outlook!Office.AppointmentRead#normalizedSubject:member' + package: outlook! + fullName: normalizedSubject + summary: >- + Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + + + The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) + that are added by email programs. To get the subject of the item with the prefixes intact, use the `subject` + property. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-normalized-subject-read.yaml + + + console.log(`Normalized subject: ${Office.context.mailbox.item.normalizedSubject}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'normalizedSubject: string;' + return: + type: string + - name: notificationMessages + uid: 'outlook!Office.AppointmentRead#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds a progress indicator to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, + message: "Progress indicator with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an informational notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Non-persistent informational notification message with id = " + id, + icon: "icon1", + persistent: false + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds a persistent information notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Persistent informational notification message with id = " + id, + icon: "icon1", + persistent: true + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + + ... + + + // Replaces a notification message of a given key with another message. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.replaceAsync( + id, + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Notification message with id = " + id + " has been replaced with an informational message.", + icon: "icon2", + persistent: false + }, + handleResult); + + ... + + + // Removes a notification message from the current mail item. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.removeAsync(id, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: optionalAttendees + uid: 'outlook!Office.AppointmentRead#optionalAttendees:member' + package: outlook! + fullName: optionalAttendees + summary: >- + Provides access to the optional attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + The `optionalAttendees` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each optional attendee to the + meeting. The maximum number of attendees returned varies per Outlook client. + + + - Windows: 500 attendees + + + - Android, classic Mac UI, iOS: 100 attendees + + + - New Mac UI, web browser: No limit + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-optional-attendees-appointment-attendee.yaml + + + const apptOptionalAttendees = Office.context.mailbox.item.optionalAttendees; + + console.log("Optional attendees:"); + + for (let i = 0; i < apptOptionalAttendees.length; i++) { + console.log( + apptOptionalAttendees[i].displayName + + " (" + + apptOptionalAttendees[i].emailAddress + + ") - response: " + + apptOptionalAttendees[i].appointmentResponse + ); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'optionalAttendees: EmailAddressDetails[];' + return: + type: '[]' + - name: organizer + uid: 'outlook!Office.AppointmentRead#organizer:member' + package: outlook! + fullName: organizer + summary: Gets the meeting organizer's email properties. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-organizer-appointment-attendee.yaml + + + const apptOrganizer = Office.context.mailbox.item.organizer; + + console.log("Organizer: " + apptOrganizer.displayName + " (" + apptOrganizer.emailAddress + ")"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'organizer: EmailAddressDetails;' + return: + type: '' + - name: recurrence + uid: 'outlook!Office.AppointmentRead#recurrence:member' + package: outlook! + fullName: recurrence + summary: >- + Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + + + The `recurrence` property returns a [Recurrence](xref:outlook!Office.Recurrence:interface) object for recurring + appointments or meetings requests if an item is a series or an instance in a series. `null` is returned for single + appointments and meeting requests of single appointments. + + + **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. + + + **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a + meeting request of a single appointment and NOT a part of a series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-recurrence-read.yaml + + + const recurrence = Office.context.mailbox.item.recurrence; + + + if (recurrence === undefined) { + console.log("This item is a message but not a meeting request."); + } else if (recurrence === null) { + console.log("This is a single appointment."); + } else { + console.log(JSON.stringify(recurrence)); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'recurrence: Recurrence;' + return: + type: '' + - name: requiredAttendees + uid: 'outlook!Office.AppointmentRead#requiredAttendees:member' + package: outlook! + fullName: requiredAttendees + summary: >- + Provides access to the required attendees of an event. The type of object and level of access depend on the mode + of the current item. + + + The `requiredAttendees` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each required attendee to the + meeting. The maximum number of attendees returned varies per Outlook client. + + + - Windows: 500 attendees + + + - Android, classic Mac UI, iOS: 100 attendees + + + - New Mac UI, web browser: No limit + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: In Outlook on the web and on Windows (new and classic), the appointment organizer is included + in the object returned by the `requiredAttendees` property. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-required-attendees-appointment-attendee.yaml + + + const apptRequiredAttendees = Office.context.mailbox.item.requiredAttendees; + + console.log("Required attendees:"); + + for (let i = 0; i < apptRequiredAttendees.length; i++) { + console.log( + apptRequiredAttendees[i].displayName + + " (" + + apptRequiredAttendees[i].emailAddress + + ") - response: " + + apptRequiredAttendees[i].appointmentResponse + ); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'requiredAttendees: EmailAddressDetails[];' + return: + type: '[]' + - name: sensitivity + uid: 'outlook!Office.AppointmentRead#sensitivity:member' + package: outlook! + fullName: sensitivity + summary: Provides the sensitivity value of the appointment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. + + + #### Examples + + + ```TypeScript + + const sensitivity = Office.context.mailbox.item.sensitivity; + + console.log("Sensitivity: " + sensitivity); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sensitivity: MailboxEnums.AppointmentSensitivityType;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.AppointmentRead#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac, the + `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + However, on iOS and Android, the seriesId returns the REST ID of the parent item. + + + **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item + identifier. The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. For more details, see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series + items, or meeting requests and returns `undefined` for any other items that are not meeting requests. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-series-id.yaml + + + const seriesId = Office.context.mailbox.item.seriesId; + + + if (seriesId === undefined) { + console.log("This is a message that's not a meeting request."); + } else if (seriesId === null) { + console.log("This is a single appointment, a parent series, or a meeting request for a series or single meeting."); + } else { + console.log("This is an instance belonging to series with ID " + seriesId); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: start + uid: 'outlook!Office.AppointmentRead#start:member' + package: outlook! + fullName: start + summary: >- + Gets the date and time that the appointment is to begin. + + + The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You + can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml + + + console.log(`Appointment starts: ${Office.context.mailbox.item.start}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'start: Date;' + return: + type: Date + - name: subject + uid: 'outlook!Office.AppointmentRead#subject:member' + package: outlook! + fullName: subject + summary: >- + Gets the description that appears in the subject field of an item. + + + The `subject` property gets or sets the entire subject of the item, as sent by the email server. + + + The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading + prefixes such as RE: and FW:. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-subject-read.yaml + + + console.log(`Subject: ${Office.context.mailbox.item.subject}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'subject: string;' + return: + type: string +methods: + - name: 'addHandlerAsync(eventType, handler, options, callback)' + uid: 'outlook!Office.AppointmentRead#addHandlerAsync:member(1)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, options, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + function myHandlerFunction(eventarg) { + if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = eventarg.attachmentDetails; + console.log("Event Fired and Attachment Added!"); + getAttachmentContentAsync(attachment.id, options, callback); + } + } + + + Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, callback)' + uid: 'outlook!Office.AppointmentRead#addHandlerAsync:member(2)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayReplyAllForm(formData) + uid: 'outlook!Office.AppointmentRead#displayReplyAllForm:member(1)' + package: outlook! + fullName: displayReplyAllForm(formData) + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in + the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // The following code passes a string to the `displayReplyAllForm` method. + + Office.context.mailbox.item.displayReplyAllForm('hello there'); + + Office.context.mailbox.item.displayReplyAllForm('hello there'); + + + // Reply with an empty body. + + Office.context.mailbox.item.displayReplyAllForm({}); + + + // Reply with just a body. + + Office.context.mailbox.item.displayReplyAllForm( + + { + + 'htmlBody' : 'hi' + + }); + + + // Reply with a body and a file attachment. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : Office.MailboxEnums.AttachmentType.File, + 'name' : 'squirrel.png', + 'url' : 'http://i.imgur.com/sRgTlGR.jpg' + } + ] + }); + + + // Reply with a body and an item attachment. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : 'item', + 'name' : 'rand', + 'itemId' : Office.context.mailbox.item.itemId + } + ] + }); + + + // Reply with a body, file attachment, item attachment, and a callback. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : Office.MailboxEnums.AttachmentType.File, + 'name' : 'squirrel.png', + 'url' : 'http://i.imgur.com/sRgTlGR.jpg' + }, + { + 'type' : 'item', + 'name' : 'rand', + 'itemId' : Office.context.mailbox.item.itemId + } + ], + 'callback' : function(asyncResult) + { + console.log(asyncResult.value); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyAllForm("This is a reply ALL with some bold text."); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayReplyAllForm(formData: string | ReplyFormData): void;' + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + return: + type: void + description: '' + - name: 'displayReplyAllFormAsync(formData, options, callback)' + uid: 'outlook!Office.AppointmentRead#displayReplyAllFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyAllFormAsync("This is a reply ALL with some bold text.", function( + asyncResult + ) { + console.log(JSON.stringify(asyncResult)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyAllFormAsync(formData, callback)' + uid: 'outlook!Office.AppointmentRead#displayReplyAllFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayReplyForm(formData) + uid: 'outlook!Office.AppointmentRead#displayReplyForm:member(1)' + package: outlook! + fullName: displayReplyForm(formData) + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyForm("This is a reply with some text in italics."); + + + ... + + + Office.context.mailbox.item.displayReplyForm({ + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "https://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ], + callback: (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + + console.log("Created reply with attachments."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayReplyForm(formData: string | ReplyFormData): void;' + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, options, callback)' + uid: 'outlook!Office.AppointmentRead#displayReplyFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyFormAsync("This is a reply with some text in italics.", function( + asyncResult + ) { + console.log(JSON.stringify(asyncResult)); + }); + + + ... + + + // The async version is only available starting with requirement set 1.9. + + // It provides a callback when the new appointment form has been created. + + Office.context.mailbox.item.displayReplyFormAsync( + { + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "http://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ] + }, + (asyncResult) => { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, callback)' + uid: 'outlook!Office.AppointmentRead#displayReplyFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.AppointmentRead#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.AppointmentRead%23attachments:member) call, then in the same session, use + that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachment-content.yaml + + + // Gets the attachments of the current message or appointment in read mode. + + // The item.attachments call can only be used in read mode. + + const attachments = item.attachments; + + if (attachments.length <= 0) { + console.log("Mail item has no attachments."); + return; + } + + + for (let i = 0; i < attachments.length; i++) { + // Log the attachment type and its contents to the console. + item.getAttachmentContentAsync(attachments[i].id, handleAttachmentsCallback); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.AppointmentRead#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.AppointmentRead%23attachments:member) call, then in the same session, use + that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getEntities() + uid: 'outlook!Office.AppointmentRead#getEntities:member(1)' + package: outlook! + fullName: getEntities() + summary: >- + Gets the entities found in the selected item's body. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'getEntities(): Entities;' + return: + type: '' + description: '' + - name: getEntitiesByType(entityType) + uid: 'outlook!Office.AppointmentRead#getEntitiesByType:member(1)' + package: outlook! + fullName: getEntitiesByType(entityType) + summary: >- + Gets an array of all the entities of the specified entity type found in the selected item's body. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: >- + getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; + parameters: + - id: entityType + description: One of the `EntityType` enumeration values. + type: ' | string' + return: + type: >- + Array<string | | | | + > + description: >- + If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns + null. If no entities of the specified type are present in the item's body, the method returns an empty array. + Otherwise, the type of the objects in the returned array depends on the type of entity requested in the + `entityType` parameter. + - name: getFilteredEntitiesByName(name) + uid: 'outlook!Office.AppointmentRead#getFilteredEntitiesByName:member(1)' + package: outlook! + fullName: getFilteredEntitiesByName(name) + summary: >- + Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest + file. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: >- + getFilteredEntitiesByName(name: string): Array; + parameters: + - id: name + description: The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + type: string + return: + type: >- + Array<string | | | | + > + description: >- + The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the add-in + manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the + manifest with a `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an `ItemHasKnownEntity` element in the manifest, but there are no + entities in the current item that match, the method returns an empty array. + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.AppointmentRead#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Get the initialization context (if present). + + Office.context.mailbox.item.getInitializationContextAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + if (asyncResult.value.length > 0) { + // The value is a string, parse to an object. + const context = JSON.parse(asyncResult.value); + // Do something with context. + } else { + // Empty context, treat as no context. + } + } else { + // Handle the error. + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.AppointmentRead#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getRegExMatches() + uid: 'outlook!Office.AppointmentRead#getRegExMatches:member(1)' + package: outlook! + fullName: getRegExMatches() + summary: >- + Returns string values in the selected item that match the regular expressions defined in an add-in only manifest + file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + // The following example shows how to access the array of + + // matches for the regular expression rule elements `fruits` + + // and `veggies`, which are specified in the manifest. + + const allMatches = Office.context.mailbox.item.getRegExMatches(); + + const fruits = allMatches.fruits; + + const veggies = allMatches.veggies; + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + // This API only works when you click on the highlighted word "ScriptLab". + + console.log(Office.context.mailbox.item.getRegExMatches()); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the add-in manifest + file. The name of each array is equal to the corresponding value of the RegExName attribute of the matching + `ItemHasRegularExpressionMatch` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to + occur in the property of the item that's specified by that rule. The `PropertyName` simple type defines the + supported properties. + - name: getRegExMatchesByName(name) + uid: 'outlook!Office.AppointmentRead#getRegExMatchesByName:member(1)' + package: outlook! + fullName: getRegExMatchesByName(name) + summary: >- + Returns string values in the selected item that match the named regular expression defined in an add-in only + manifest file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + const fruits = Office.context.mailbox.item.getRegExMatchesByName("fruits"); + + const veggies = Office.context.mailbox.item.getRegExMatchesByName("veggies"); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + // This API only works when you click on the highlighted word "ScriptLab". + + console.log(Office.context.mailbox.item.getRegExMatchesByName("sampleRegexName")); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatchesByName(name: string): string[];' + parameters: + - id: name + description: The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + type: string + return: + type: 'string[]' + description: >- + An array that contains the strings that match the regular expression defined in the + `ItemHasRegularExpressionMatch` rule element in the add-in manifest file, with the specified `RegExName` + element value. + - name: getSelectedEntities() + uid: 'outlook!Office.AppointmentRead#getSelectedEntities:member(1)' + package: outlook! + fullName: getSelectedEntities() + summary: >- + Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual + add-ins. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'getSelectedEntities(): Entities;' + return: + type: '' + description: '' + - name: getSelectedRegExMatches() + uid: 'outlook!Office.AppointmentRead#getSelectedRegExMatches:member(1)' + package: outlook! + fullName: getSelectedRegExMatches() + summary: >- + Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest + file. Highlighted matches apply to contextual add-ins. + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as .* to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + // The following example shows how to access the array of matches for the + + // regular expression rule elements `fruits` and `veggies`, which are + + // specified in the manifest. + + const selectedMatches = Office.context.mailbox.item.getSelectedRegExMatches(); + + const fruits = selectedMatches.fruits; + + const veggies = selectedMatches.veggies; + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + const matches = Office.context.mailbox.item.getSelectedRegExMatches(); + + if (matches) { + console.log(matches); + } else { + console.error("Open add-in by clicking on a highlighted regex match, for this API to return something useful."); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSelectedRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the add-in manifest + file. The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching + `ItemHasRegularExpressionMatch` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to + occur in the property of the item that's specified by that rule. The `PropertyName` simple type defines the + supported properties. + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.AppointmentRead#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.AppointmentRead#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml + + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + const sharedProperties = result.value; + console.log(`Owner: ${sharedProperties.owner}`); + console.log(`Permissions: ${sharedProperties.delegatePermissions}`); + console.log(`Target mailbox: ${sharedProperties.targetMailbox}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.AppointmentRead#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get, set, save, and remove custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/15-item-custom-properties/load-set-get-save.yaml + + + Office.context.mailbox.item.loadCustomPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`loadCustomPropertiesAsync failed with message ${result.error.message}`); + return; + } + + customProps = result.value; + console.log("Loaded the CustomProperties object."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, options, callback)' + uid: 'outlook!Office.AppointmentRead#removeHandlerAsync:member(1)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, options, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, callback)' + uid: 'outlook!Office.AppointmentRead#removeHandlerAsync:member(2)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.removeHandlerAsync(Office.EventType.InfobarClicked, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to remove event handler: " + asyncResult.error.message); + return; + } + + console.log("Event handler removed successfully."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmenttimechangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmenttimechangedeventargs.yml new file mode 100644 index 0000000000..2b809a74af --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.appointmenttimechangedeventargs.yml @@ -0,0 +1,79 @@ +### YamlMime:TSType +name: Office.AppointmentTimeChangedEventArgs +uid: 'outlook!Office.AppointmentTimeChangedEventArgs:interface' +package: outlook! +fullName: Office.AppointmentTimeChangedEventArgs +summary: >- + Provides the current dates and times of the appointment that raised the `Office.EventType.AppointmentTimeChanged` + event. +remarks: |- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Adds an event handler for the AppointmentTimeChanged event. + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.AppointmentTimeChanged, appointmentTimeChangedHandler, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Failed to add event handler: ${asyncResult.error.message}`); + return; + } + + console.log("Event handler added successfully."); + }); + }); + }); + + // Handles the AppointmentTimeChanged event. + function appointmentTimeChangedHandler(event) { + console.log(`Event: ${event.type}`); + console.log(`Start time: ${event.start}`); + console.log(`End time: ${event.end}`); + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: end + uid: 'outlook!Office.AppointmentTimeChangedEventArgs#end:member' + package: outlook! + fullName: end + summary: Gets the appointment end date and time. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'end: Date;' + return: + type: Date + - name: start + uid: 'outlook!Office.AppointmentTimeChangedEventArgs#start:member' + package: outlook! + fullName: start + summary: Gets the appointment start date and time. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'start: Date;' + return: + type: Date + - name: type + uid: 'outlook!Office.AppointmentTimeChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkAppointmentTimeChanged";' + return: + type: '"olkAppointmentTimeChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentcontent.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentcontent.yml new file mode 100644 index 0000000000..13c3cd69f5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentcontent.yml @@ -0,0 +1,104 @@ +### YamlMime:TSType +name: Office.AttachmentContent +uid: 'outlook!Office.AttachmentContent:interface' +package: outlook! +fullName: Office.AttachmentContent +summary: Represents the content of an attachment on a message or appointment item. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +properties: + - name: content + uid: 'outlook!Office.AttachmentContent#content:member' + package: outlook! + fullName: content + summary: The content of an attachment as a string. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'content: string;' + return: + type: string + - name: format + uid: 'outlook!Office.AttachmentContent#format:member' + package: outlook! + fullName: format + summary: >- + The string format to use for an attachment's content. + + + For file attachments, the formatting is a Base64-encoded string. + + + For item attachments that represent messages and were attached by drag-and-drop or "Attach Item", the formatting + is a string representing an .eml formatted file. + + + For item attachments that represent calendar items and were attached by drag-and-drop or "Attach Item", the + formatting is a string representing an .icalendar file. + + + **Important**: If a message or calendar item was attached by drag-and-drop in Outlook on the web or [new + Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), then + `getAttachmentContentAsync` throws an error. + + + For cloud attachments, the formatting is a URL string. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'format: MailboxEnums.AttachmentContentFormat | string;' + return: + type: ' | string' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const options = {asyncContext: {currentItem: item}}; + item.getAttachmentsAsync(options, callback); + + function callback(result) { + if (result.value.length > 0) { + for (let i = 0 ; i < result.value.length ; i++) { + result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback); + } + } + } + + function handleAttachmentsCallback(result) { + // Parse string to be a url, an .eml file, a base64-encoded string, or an .icalendar file. + switch (result.value.format) { + case Office.MailboxEnums.AttachmentContentFormat.Base64: + // Handle file attachment. + break; + case Office.MailboxEnums.AttachmentContentFormat.Eml: + // Handle email item attachment. + break; + case Office.MailboxEnums.AttachmentContentFormat.ICalendar: + // Handle .icalender attachment. + break; + case Office.MailboxEnums.AttachmentContentFormat.Url: + // Handle cloud attachment. + break; + default: + // Handle attachment formats that are not supported. + } + } + ``` diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml new file mode 100644 index 0000000000..2545b6e16d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetails.yml @@ -0,0 +1,148 @@ +### YamlMime:TSType +name: Office.AttachmentDetails +uid: 'outlook!Office.AttachmentDetails:interface' +package: outlook! +fullName: Office.AttachmentDetails +summary: |- + Represents an attachment on an item from the server. Read mode only. + + An array of `AttachmentDetails` objects is returned as the `attachments` property of an appointment or message item. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + #### Examples + + + ```TypeScript + + // The following code builds an HTML string with details + + // of all attachments on the current item. + + const item = Office.context.mailbox.item; + + let outputString = ""; + + + if (item.attachments.length > 0) { + for (let i = 0 ; i < item.attachments.length ; i++) { + const attachment = item.attachments[i]; + outputString += "
" + i + ". Name: "; + outputString += attachment.name; + outputString += "
ID: " + attachment.id; + outputString += "
contentType: " + attachment.contentType; + outputString += "
size: " + attachment.size; + outputString += "
attachmentType: " + attachment.attachmentType; + outputString += "
isInline: " + attachment.isInline; + } + } + + + console.log(outputString); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachmentType + uid: 'outlook!Office.AttachmentDetails#attachmentType:member' + package: outlook! + fullName: attachmentType + summary: Gets a value that indicates the attachment's type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'attachmentType: MailboxEnums.AttachmentType | string;' + return: + type: ' | string' + - name: contentType + uid: 'outlook!Office.AttachmentDetails#contentType:member' + package: outlook! + fullName: contentType + summary: >- + Gets the MIME content type of the attachment. + + + **Warning**: While the `contentType` value is a direct lookup of the attachment's extension, the internal + mapping isn't actively maintained so this property has been deprecated. If you require specific types, grab the + attachment's extension and process accordingly. For details, refer to the [related blog + post](https://devblogs.microsoft.com/microsoft365dev/outlook-javascript-api-deprecation-for-attachmentdetails-contenttype-property/). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: 'If you require specific content types, grab the attachment''s extension and process accordingly.' + syntax: + content: 'contentType: string;' + return: + type: string + - name: id + uid: 'outlook!Office.AttachmentDetails#id:member' + package: outlook! + fullName: id + summary: >- + Gets the Exchange attachment ID of the attachment. However, if the attachment type is + `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string + - name: isInline + uid: 'outlook!Office.AttachmentDetails#isInline:member' + package: outlook! + fullName: isInline + summary: >- + Gets a value that indicates whether the attachment appears as an image in the body of the item instead of in the + attachment list. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'isInline: boolean;' + return: + type: boolean + - name: name + uid: 'outlook!Office.AttachmentDetails#name:member' + package: outlook! + fullName: name + summary: >- + Gets the name of the attachment. + + + **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` + includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'name: string;' + return: + type: string + - name: size + uid: 'outlook!Office.AttachmentDetails#size:member' + package: outlook! + fullName: size + summary: Gets the size of the attachment in bytes. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'size: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml new file mode 100644 index 0000000000..62efcf5af9 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentdetailscompose.yml @@ -0,0 +1,104 @@ +### YamlMime:TSType +name: Office.AttachmentDetailsCompose +uid: 'outlook!Office.AttachmentDetailsCompose:interface' +package: outlook! +fullName: Office.AttachmentDetailsCompose +summary: |- + Represents an attachment on an item. Compose mode only. + + An array of `AttachmentDetailsCompose` objects is returned by the `getAttachmentsAsync` method. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachmentType + uid: 'outlook!Office.AttachmentDetailsCompose#attachmentType:member' + package: outlook! + fullName: attachmentType + summary: Gets a value that indicates the attachment's type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'attachmentType: MailboxEnums.AttachmentType | string;' + return: + type: ' | string' + - name: id + uid: 'outlook!Office.AttachmentDetailsCompose#id:member' + package: outlook! + fullName: id + summary: Gets the index of the attachment. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string + - name: isInline + uid: 'outlook!Office.AttachmentDetailsCompose#isInline:member' + package: outlook! + fullName: isInline + summary: >- + Gets a value that indicates whether the attachment appears as an image in the body of the item instead of in the + attachment list. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'isInline: boolean;' + return: + type: boolean + - name: name + uid: 'outlook!Office.AttachmentDetailsCompose#name:member' + package: outlook! + fullName: name + summary: >- + Gets the name of the attachment. + + + **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", `name` + includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'name: string;' + return: + type: string + - name: size + uid: 'outlook!Office.AttachmentDetailsCompose#size:member' + package: outlook! + fullName: size + summary: Gets the size of the attachment in bytes. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'size: number;' + return: + type: number + - name: url + uid: 'outlook!Office.AttachmentDetailsCompose#url:member' + package: outlook! + fullName: url + summary: Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'url?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentschangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentschangedeventargs.yml new file mode 100644 index 0000000000..324fb81eaa --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.attachmentschangedeventargs.yml @@ -0,0 +1,68 @@ +### YamlMime:TSType +name: Office.AttachmentsChangedEventArgs +uid: 'outlook!Office.AttachmentsChangedEventArgs:interface' +package: outlook! +fullName: Office.AttachmentsChangedEventArgs +summary: Provides information about the attachment on a mail item that raised the `Office.EventType.AttachmentsChanged` event. +remarks: |- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Handles the OnMessageAttachmentsChanged event. + function onMessageAttachmentsChangedHandler(event) { + console.log(`Event: ${event.type}`); + + if (event.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = event.attachmentDetails; + // Perform operations on the attachment that was added. + } + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachmentDetails + uid: 'outlook!Office.AttachmentsChangedEventArgs#attachmentDetails:member' + package: outlook! + fullName: attachmentDetails + summary: >- + Gets the object that represents the attachment that was added or removed from a mail item. The object contains the + `id`, `name`, `size`, and `attachmentType` properties of the attachment. + remarks: '\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'attachmentDetails: object;' + return: + type: object + - name: attachmentStatus + uid: 'outlook!Office.AttachmentsChangedEventArgs#attachmentStatus:member' + package: outlook! + fullName: attachmentStatus + summary: >- + Specifies whether the attachment was added or removed from a mail item. For details, see + [MailboxEnums.AttachmentStatus](xref:outlook!Office.MailboxEnums.AttachmentStatus:enum). + remarks: '\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'attachmentStatus: MailboxEnums.AttachmentStatus | string;' + return: + type: ' | string' + - name: type + uid: 'outlook!Office.AttachmentsChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of event that was raised. For details, see + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkAttachmentsChanged";' + return: + type: '"olkAttachmentsChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.body.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.body.yml new file mode 100644 index 0000000000..135e8b0d07 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.body.yml @@ -0,0 +1,1639 @@ +### YamlMime:TSType +name: Office.Body +uid: 'outlook!Office.Body:interface' +package: outlook! +fullName: Office.Body +summary: >- + The body object provides methods for adding and updating the content of the message or appointment. It is returned in + the body property of the selected item. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **Known issue with HTML table border colors** + + + Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a + cell's borders may not reflect the expected color. For the known behavior, visit [OfficeDev/office-js issue + \#1818](https://github.com/OfficeDev/office-js/issues/1818). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[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/20-item-body/add-inline-base64-image.yaml + + + const mailItem = Office.context.mailbox.item; + + const base64String = + "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN0S+bUAAAAMdFJOUwAQIDBAUI+fr7/P7yEupu8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVGhD7dfLdoMwDEVR6Cspzf9/b20QYOthS5Zn0Z2kVdY6O2WULrFYLBaLxd5ur4mDZD14b8ogWS/dtxV+dmx9ysA2QUj9TQRWv5D7HyKwuIW9n0vc8tkpHP0W4BOg3wQ8wtlvA+PC1e8Ao8Ld7wFjQtHvAiNC2e8DdqHqKwCrUPc1gE1AfRVgEXBfB+gF0lcCWoH2tYBOYPpqQCNwfT3QF9i+AegJfN8CtAWhbwJagtS3AbIg9o2AJMh9M5C+SVGBvx6zAfmT0r+Bv8JMwP4kyFPir+cswF5KL3WLv14zAFBCLf56Tw9cparFX4upgaJUtPhrOS1QlY5W+vWTXrGgBFB/b72ev3/0igUdQPppP/nfowfKUUEFcP207y/yxKmgAYQ+PywoAFOfCH3A2MdCFzD3kdADBvq10AGG+pXQBgb7pdAEhvuF0AIc/VtoAK7+JciAs38KIuDugyAC/v4hiMCE/i7IwLRBsh68N2WQjMVisVgs9i5bln8LGScNcCrONQAAAABJRU5ErkJggg=="; + + // Get the current body of the message or appointment. + + mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => { + if (bodyResult.status === Office.AsyncResultStatus.Succeeded) { + // Insert the Base64-encoded image to the beginning of the body. + const options = { isInline: true, asyncContext: bodyResult.value }; + mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => { + if (attachResult.status === Office.AsyncResultStatus.Succeeded) { + let body = attachResult.asyncContext; + body = body.replace("

", `

`); + + mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => { + if (setResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Inline Base64-encoded image added to the body."); + } else { + console.log(setResult.error.message); + } + }); + } else { + console.log(attachResult.error.message); + } + }); + } else { + console.log(bodyResult.error.message); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'appendOnSendAsync(data, options, callback)' + uid: 'outlook!Office.Body#appendOnSendAsync:member(1)' + package: outlook! + fullName: 'appendOnSendAsync(data, options, callback)' + summary: >- + Appends on send the specified content to the end of the item body, after any signature. + + + To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with + the type of manifest. See [Understanding Outlook add-in + permissions](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions). To learn more about append-on-send and its configuration, see [Implement append-on-send in your Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send). + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - If the user is running add-ins that implement the [on-send + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins) using `ItemSend` in the + manifest, append-on-send runs before on-send functionality. + + + - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, the + `appendOnSendAsync` call returns an error as this scenario isn't supported. + + + - To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to + `null`. + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `appendOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the + message body is in plain text. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/append-text-on-send.yaml + + + // This snippet appends text to the end of the message or appointment's body once it's sent. + + const text = $("#text-field").val(); + + + // It's recommended to call getTypeAsync and pass its returned value to the options.coercionType parameter of the + appendOnSendAsync call. + + Office.context.mailbox.item.body.getTypeAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + const bodyFormat = asyncResult.value; + Office.context.mailbox.item.body.appendOnSendAsync(text, { coercionType: bodyFormat }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log(`"${text}" will be appended to the body once the message or appointment is sent. Send the mail item to test this feature.`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + appendOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: 'The string to be added to the end of the body. The string is limited to 5,000 characters.' + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: The desired + format for the data to be appended. The string in the `data` parameter will be converted to this format. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'appendOnSendAsync(data, callback)' + uid: 'outlook!Office.Body#appendOnSendAsync:member(2)' + package: outlook! + fullName: 'appendOnSendAsync(data, callback)' + summary: >- + Appends on send the specified content to the end of the item body, after any signature. + + + To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with + the type of manifest. See [Understanding Outlook add-in + permissions](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions). To learn more about append-on-send and its configuration, see [Implement append-on-send in your Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send). + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - If the user is running add-ins that implement the [on-send + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins) using `ItemSend` in the + manifest, append-on-send runs before on-send functionality. + + + - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, the + `appendOnSendAsync` call returns an error as this scenario isn't supported. + + + - To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to + `null`. + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `appendOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the + message body is in plain text. + isPreview: false + isDeprecated: false + syntax: + content: 'appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: 'The string to be added to the end of the body. The string is limited to 5,000 characters.' + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAsync(coercionType, options, callback)' + uid: 'outlook!Office.Body#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(coercionType, options, callback)' + summary: |- + Returns the current body in a specified format. + + This method returns the entire current body in the format specified by `coercionType`. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` + method won't necessarily be the exact same value that was previously passed in the `Body.setAsync` method. The + client may modify the value passed to `setAsync` to make it render efficiently with its rendering engine. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), if the body contains + formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call. + Otherwise, you may receive an unexpected value, such as an empty string. + + + #### Examples + + + ```TypeScript + + // This example gets the body of the item as plain text. + + Office.context.mailbox.item.body.getAsync( + "text", + { asyncContext: "This is passed to the callback" }, + function callback(result) { + // Do something with the result. + }); + + // The following is an example of the result parameter passed to the callback function. + + { + "value": "TEXT of whole body (including threads below)", + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: coercionType + description: The format for the returned body. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. The body is provided in the requested format in the + `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAsync(coercionType, callback)' + uid: 'outlook!Office.Body#getAsync:member(2)' + package: outlook! + fullName: 'getAsync(coercionType, callback)' + summary: |- + Returns the current body in a specified format. + + This method returns the entire current body in the format specified by `coercionType`. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` + method won't necessarily be the exact same value that was previously passed in the `Body.setAsync` method. The + client may modify the value passed to `setAsync` to make it render efficiently with its rendering engine. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), if the body contains + formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call. + Otherwise, you may receive an unexpected value, such as an empty string. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/add-inline-base64-image.yaml + + + const mailItem = Office.context.mailbox.item; + + const base64String = + "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN0S+bUAAAAMdFJOUwAQIDBAUI+fr7/P7yEupu8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVGhD7dfLdoMwDEVR6Cspzf9/b20QYOthS5Zn0Z2kVdY6O2WULrFYLBaLxd5ur4mDZD14b8ogWS/dtxV+dmx9ysA2QUj9TQRWv5D7HyKwuIW9n0vc8tkpHP0W4BOg3wQ8wtlvA+PC1e8Ao8Ld7wFjQtHvAiNC2e8DdqHqKwCrUPc1gE1AfRVgEXBfB+gF0lcCWoH2tYBOYPpqQCNwfT3QF9i+AegJfN8CtAWhbwJagtS3AbIg9o2AJMh9M5C+SVGBvx6zAfmT0r+Bv8JMwP4kyFPir+cswF5KL3WLv14zAFBCLf56Tw9cparFX4upgaJUtPhrOS1QlY5W+vWTXrGgBFB/b72ev3/0igUdQPppP/nfowfKUUEFcP207y/yxKmgAYQ+PywoAFOfCH3A2MdCFzD3kdADBvq10AGG+pXQBgb7pdAEhvuF0AIc/VtoAK7+JciAs38KIuDugyAC/v4hiMCE/i7IwLRBsh68N2WQjMVisVgs9i5bln8LGScNcCrONQAAAABJRU5ErkJggg=="; + + // Get the current body of the message or appointment. + + mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => { + if (bodyResult.status === Office.AsyncResultStatus.Succeeded) { + // Insert the Base64-encoded image to the beginning of the body. + const options = { isInline: true, asyncContext: bodyResult.value }; + mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => { + if (attachResult.status === Office.AsyncResultStatus.Succeeded) { + let body = attachResult.asyncContext; + body = body.replace("

", `

`); + + mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => { + if (setResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Inline Base64-encoded image added to the body."); + } else { + console.log(setResult.error.message); + } + }); + } else { + console.log(attachResult.error.message); + } + }); + } else { + console.log(bodyResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(coercionType: Office.CoercionType | string, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: coercionType + description: The format for the returned body. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. The body is provided in the requested format in the + `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getTypeAsync(options, callback)' + uid: 'outlook!Office.Body#getTypeAsync:member(1)' + package: outlook! + fullName: 'getTypeAsync(options, callback)' + summary: Gets a value that indicates whether the content is in HTML or text format. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only + the Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see + [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/get-body-format.yaml + + + // Get the mail item's body format (plain text or HTML) and log it to the console. + + Office.context.mailbox.item.body.getTypeAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log("Body format: " + asyncResult.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getTypeAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. The content type is returned as one of the `CoercionType` + values in the `asyncResult.value` property. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getTypeAsync(callback) + uid: 'outlook!Office.Body#getTypeAsync:member(2)' + package: outlook! + fullName: getTypeAsync(callback) + summary: Gets a value that indicates whether the content is in HTML or text format. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only + the Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see + [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: 'getTypeAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. The content type is returned as one of the `CoercionType` + values in the `asyncResult.value` property. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'prependAsync(data, options, callback)' + uid: 'outlook!Office.Body#prependAsync:member(1)' + package: outlook! + fullName: 'prependAsync(data, options, callback)' + summary: Adds the specified content to the beginning of the item body. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - After the content is prepended, the position of the cursor depends on which client the add-in is running. In + Outlook on the web and on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), the cursor + position remains the same in the preexisting content of the body. For example, if the cursor was positioned at the + beginning of the body prior to the `prependAsync` call, it will appear between the prepended content and the + preexisting content of the body after the call. In Outlook on Mac, the cursor position isn't preserved. The cursor + disappears after the `prependAsync` call and only reappears when the user selects something in the body of the + mail item. + + + - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to + `prependAsync` to make it render efficiently with its rendering engine. This means that the value returned from a + subsequent call to the `Body.getAsync` method (introduced in Mailbox 1.3) won't necessarily contain the exact + value that was passed in the previous `prependAsync` call. + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment + Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript + APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `prependAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/prepend-text-to-item-body.yaml + + + /* This snippet adds text to the beginning of the message or appointment's body. + + When prepending a link in HTML markup to the body, you can disable the online link preview by setting the anchor tag's id attribute to "LPNoLP". For example, 'Click here!'. + */ + + const text = $("#text-field").val().toString(); + + + // It's recommended to call getTypeAsync and pass its returned value to the options.coercionType parameter of the + prependAsync call. + + Office.context.mailbox.item.body.getTypeAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + const bodyFormat = asyncResult.value; + Office.context.mailbox.item.body.prependAsync(text, { coercionType: bodyFormat }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log(`"${text}" prepended to the body.`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + prependAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: 'The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters.' + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: The desired + format for the body. The string in the `data` parameter will be converted to this format. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'prependAsync(data, callback)' + uid: 'outlook!Office.Body#prependAsync:member(2)' + package: outlook! + fullName: 'prependAsync(data, callback)' + summary: Adds the specified content to the beginning of the item body. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - After the content is prepended, the position of the cursor depends on which client the add-in is running. In + Outlook on the web and on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), the cursor + position remains the same in the preexisting content of the body. For example, if the cursor was positioned at the + beginning of the body prior to the `prependAsync` call, it will appear between the prepended content and the + preexisting content of the body after the call. In Outlook on Mac, the cursor position isn't preserved. The cursor + disappears after the `prependAsync` call and only reappears when the user selects something in the body of the + mail item. + + + - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to + `prependAsync` to make it render efficiently with its rendering engine. This means that the value returned from a + subsequent call to the `Body.getAsync` method (introduced in Mailbox 1.3) won't necessarily contain the exact + value that was passed in the previous `prependAsync` call. + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment + Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript + APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `prependAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + isPreview: false + isDeprecated: false + syntax: + content: 'prependAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: 'The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters.' + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'prependOnSendAsync(data, options, callback)' + uid: 'outlook!Office.Body#prependOnSendAsync:member(1)' + package: outlook! + fullName: 'prependOnSendAsync(data, options, callback)' + summary: >- + Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + + + To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary + with the type of manifest. For guidance, see [Understanding Outlook add-in + permissions](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions). + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` + parameter. + + + **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + + + - In a [Smart Alerts + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events), + the prepend-on-send feature runs first. + + + - A new line is added after the prepended content. + + + - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the + order in which the add-in runs. The content of the last run add-in appears above previously prepended content. + + + - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain + text will be inserted into an HTML body. + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `prependOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, + but the item body is in plain text format. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/prepend-text-on-send.yaml + + + // This snippet prepends text to the beginning of the message or appointment's body once it's sent. + + const text = $("#text-field").val().toString(); + + + // It's recommended to call getTypeAsync and pass its returned value to the options.coercionType parameter of the + prependOnSendAsync call. + + Office.context.mailbox.item.body.getTypeAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + const bodyFormat = asyncResult.value; + Office.context.mailbox.item.body.prependOnSendAsync(text, { coercionType: bodyFormat }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log(`"${text}" will be prepended to the body once the message or appointment is sent. Send the mail item to test this feature.`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + prependOnSendAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: >- + The string to be prepended to the beginning of the message or appointment body. The string is limited to + 5,000 characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Any object + that can be accessed in the callback function. `coercionType`: The desired format for the body. The + string in the `data` parameter is converted to this format. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'prependOnSendAsync(data, callback)' + uid: 'outlook!Office.Body#prependOnSendAsync:member(2)' + package: outlook! + fullName: 'prependOnSendAsync(data, callback)' + summary: >- + Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + + + To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary + with the type of manifest. For guidance, see [Understanding Outlook add-in + permissions](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions). + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` + parameter. + + + **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + + + - In a [Smart Alerts + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events), + the prepend-on-send feature runs first. + + + - A new line is added after the prepended content. + + + - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the + order in which the add-in runs. The content of the last run add-in appears above previously prepended content. + + + - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain + text will be inserted into an HTML body. + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `prependOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, + but the item body is in plain text format. + isPreview: false + isDeprecated: false + syntax: + content: 'prependOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: >- + The string to be prepended to the beginning of the message or appointment body. The string is limited to + 5,000 characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(data, options, callback)' + uid: 'outlook!Office.Body#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(data, options, callback)' + summary: Replaces the entire body with the specified text. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - After the body is replaced with the specified content, the position of the cursor depends on which client the + add-in is running. In classic Outlook on Windows, the cursor appears at the beginning of the body of the mail + item. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the cursor appears at + the end of the body of the mail item. In Outlook on Mac, the cursor position isn't preserved. The cursor + disappears after the `prependAsync` call and only reappears when the user selects something in the body of the + mail item. + + + - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` + method won't necessarily be the exact same value that was previously passed in the `Body.setAsync` method. The + client may modify the value passed to `setAsync` to make it render efficiently with its rendering engine. + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the + **Undo** command. + + + - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment + Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript + APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `setAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + + + #### Examples + + + ```TypeScript + + // When including links in HTML markup, you can disable online link preview + + // by setting the id attribute on the anchor () to "LPNoLP". + + Office.context.mailbox.item.body.setAsync( + 'Click here!', + { + coercionType: Office.CoercionType.Html, + asyncContext: "This is passed to the callback" + }, + (result) => { + // Process the result. + } + ); + + + // The following is an example of the result parameter passed to the callback function. + + { + "value": null, + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/add-inline-base64-image.yaml + + + const mailItem = Office.context.mailbox.item; + + const base64String = + "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAnUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN0S+bUAAAAMdFJOUwAQIDBAUI+fr7/P7yEupu8AAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF8SURBVGhD7dfLdoMwDEVR6Cspzf9/b20QYOthS5Zn0Z2kVdY6O2WULrFYLBaLxd5ur4mDZD14b8ogWS/dtxV+dmx9ysA2QUj9TQRWv5D7HyKwuIW9n0vc8tkpHP0W4BOg3wQ8wtlvA+PC1e8Ao8Ld7wFjQtHvAiNC2e8DdqHqKwCrUPc1gE1AfRVgEXBfB+gF0lcCWoH2tYBOYPpqQCNwfT3QF9i+AegJfN8CtAWhbwJagtS3AbIg9o2AJMh9M5C+SVGBvx6zAfmT0r+Bv8JMwP4kyFPir+cswF5KL3WLv14zAFBCLf56Tw9cparFX4upgaJUtPhrOS1QlY5W+vWTXrGgBFB/b72ev3/0igUdQPppP/nfowfKUUEFcP207y/yxKmgAYQ+PywoAFOfCH3A2MdCFzD3kdADBvq10AGG+pXQBgb7pdAEhvuF0AIc/VtoAK7+JciAs38KIuDugyAC/v4hiMCE/i7IwLRBsh68N2WQjMVisVgs9i5bln8LGScNcCrONQAAAABJRU5ErkJggg=="; + + // Get the current body of the message or appointment. + + mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => { + if (bodyResult.status === Office.AsyncResultStatus.Succeeded) { + // Insert the Base64-encoded image to the beginning of the body. + const options = { isInline: true, asyncContext: bodyResult.value }; + mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => { + if (attachResult.status === Office.AsyncResultStatus.Succeeded) { + let body = attachResult.asyncContext; + body = body.replace("

", `

`); + + mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => { + if (setResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Inline Base64-encoded image added to the body."); + } else { + console.log(setResult.error.message); + } + }); + } else { + console.log(attachResult.error.message); + } + }); + } else { + console.log(bodyResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: data + description: 'The string that will replace the existing body. The string is limited to 1,000,000 characters.' + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: The desired + format for the body. The string in the `data` parameter will be converted to this format. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` + property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(data, callback)' + uid: 'outlook!Office.Body#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(data, callback)' + summary: Replaces the entire body with the specified text. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` + parameter. + + + **Important**: + + + - After the body is replaced with the specified content, the position of the cursor depends on which client the + add-in is running. In classic Outlook on Windows, the cursor appears at the beginning of the body of the mail + item. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the cursor appears at + the end of the body of the mail item. In Outlook on Mac, the cursor position isn't preserved. The cursor + disappears after the `prependAsync` call and only reappears when the user selects something in the body of the + mail item. + + + - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` + method won't necessarily be the exact same value that was previously passed in the `Body.setAsync` method. The + client may modify the value passed to `setAsync` to make it render efficiently with its rendering engine. + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the + **Undo** command. + + + - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment + Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript + APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `setAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: 'The string that will replace the existing body. The string is limited to 1,000,000 characters.' + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` + property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, options, callback)' + uid: 'outlook!Office.Body#setSelectedDataAsync:member(1)' + package: outlook! + fullName: 'setSelectedDataAsync(data, options, callback)' + summary: >- + Replaces the selection in the body with the specified text. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, + if text is selected in the editor, it replaces the selected text. If the cursor was never in the body of the item, + or if the body of the item lost focus in the UI, the string will be inserted at the top of the body content. After + insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + + + **Important*: + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `setSelectedDataAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/replace-selected-text.yaml + + + /* This snippet replaces selected text in a message or appointment's body with specified text. + + If you want to use a link in HTML markup as a value of the setSelectedDataAsync call's data parameter, you can disable online link preview by setting the anchor tag's id attribute to "LPNoLP". For example, 'Click here!'. + */ + + const text = $("#text-field").val().toString(); + + + // It's recommended to call getTypeAsync and pass its returned value to the options.coercionType parameter of the + prependAsync call. + + Office.context.mailbox.item.body.getTypeAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + const bodyFormat = asyncResult.value; + Office.context.mailbox.item.body.setSelectedDataAsync(text, { coercionType: bodyFormat }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log(`Replaced selected text with "${text}".`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: 'The string that will replace the existing body. The string is limited to 1,000,000 characters.' + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: The desired + format for the body. The string in the `data` parameter will be converted to this format. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, callback)' + uid: 'outlook!Office.Body#setSelectedDataAsync:member(2)' + package: outlook! + fullName: 'setSelectedDataAsync(data, callback)' + summary: >- + Replaces the selection in the body with the specified text. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, + if text is selected in the editor, it replaces the selected text. If the cursor was never in the body of the item, + or if the body of the item lost focus in the UI, the string will be inserted at the top of the body content. After + insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + + + **Important*: + + + - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the + anchor (<a>) to "LPNoLP" (see the **Examples** section for a sample). + + + - SVG files aren't supported. Use JPG or PNG files instead. + + + - The `setSelectedDataAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + isPreview: false + isDeprecated: false + syntax: + content: 'setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: 'The string that will replace the existing body. The string is limited to 1,000,000 characters.' + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. Any errors encountered will be provided in the + `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSignatureAsync(data, options, callback)' + uid: 'outlook!Office.Body#setSignatureAsync:member(1)' + package: outlook! + fullName: 'setSignatureAsync(data, options, callback)' + summary: >- + Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the + body, replaces that signature. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), `setSignatureAsync` + only works on messages. + + + - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a + sample scenario, see [Implement event-based activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). To learn more about + APIs supported in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + [event-based activation feature using LaunchEvent in the + manifest](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch). When the user composes a new + item (including reply or forward), the signature is set but doesn't modify the form. This means if the user closes + the form without making other edits, they won't be prompted to save changes. + + + - SVG files aren't supported in mail signatures. Use JPG or PNG files instead. + + + - The `setSignatureAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Set the signature for the current item with inline image. + + const modIcon1Base64 = + "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDRDMxMDg1MjBCNDZFMTExODE2MkM1RUI2M0M4MDYxRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMTUxQjgyRjQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMTUxQjgyRTQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgV2luZG93cyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQxMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkNEMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+uC/WfAAAAehJREFUeNpilCzfwEAEkAbiECA2A2J1IOaHin8E4ptAfBaIVwLxU0IGMRKw0B6IW4DYhoE4cASIK6E0VsCEQ1wUiNcB8QESLGOAqj0MxBuhZhBloS4QnwHiQAbygR/UDF1CFupCXSjHQDmQg5qli8tCUBBsQUoQ1AD8UDNFsVk4n0o+w+bT+egWglKjNymmeGhLkqLcG2oHAwtUoIuQDj5OVgZPLUmwRe5aEmAxqYqNpFgKssOcCeplM0KqdST5GfpDDRm0JfkYrj3/SE7QguyQY4ImYYLgCtAS10kHGMw6dzNsv/qC7OwCClJXYlR++v6b4er3j5QmIFcmaNlIL6AOslCIjhYKMTHQGTBBqxh6gXcgC6/R0cKbIAv30dHCfaAKGJTxHxJSqS3Fz9DkowNmywpyMcgA8fF7b8D8VWcfM6w8+4gYC+VB+RCk8hSh0gaUD4/dewvlvUWRe/z+GzGWgex4BGtiOAHxXhoHpzMoSGHZAhSPW2lo2VZYWkHOh4nEtLrIAE+hZmNUwK+B2BOIv1PRsu9QM1/jatNcBtVZ0IREKXgENesyoVYbzNIdFFi2A5tl+NqlL6BB4QBNzsSCU1A9nlAzMAALAQMOQl0qB23qWwKxIlIrDBQ394H4OBCvISYqAAIMACVibHDqsO7zAAAAAElFTkSuQmCC"; + + Office.context.mailbox.item.addFileAttachmentFromBase64Async( + modIcon1Base64, + "myImage.png", + { isInline: true }, + function(result) { + if (result.status == Office.AsyncResultStatus.Succeeded) { + const signature = $("#signature").val() + ""; + console.log(`Setting signature to "${signature}".`); + Office.context.mailbox.item.body.setSignatureAsync( + signature, + { coercionType: "html" }, + function(asyncResult) { + console.log(`setSignatureAsync: ${asyncResult.status}`); + } + ); + } else { + console.error(`addFileAttachmentFromBase64Async: ${result.error}`); + } + } + ); + + + ... + + + // Set the signature for the current item. + + const signature = $("#signature").val(); + + console.log(`Setting signature to "${signature}".`); + + Office.context.mailbox.item.body.setSignatureAsync(signature, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("setSignatureAsync succeeded"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setSignatureAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: >- + The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: The format the + signature should be set to. If Text, the method sets the signature to plain text, removing any HTML tags + present. If Html, the method sets the signature to HTML. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSignatureAsync(data, callback)' + uid: 'outlook!Office.Body#setSignatureAsync:member(2)' + package: outlook! + fullName: 'setSignatureAsync(data, callback)' + summary: >- + Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the + body, replaces that signature. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), `setSignatureAsync` + only works on messages. + + + - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a + sample scenario, see [Implement event-based activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). To learn more about + APIs supported in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + [event-based activation feature using LaunchEvent in the + manifest](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch). When the user composes a new + item (including reply or forward), the signature is set but doesn't modify the form. This means if the user closes + the form without making other edits, they won't be prompted to save changes. + + + - SVG files aren't supported in mail signatures. Use JPG or PNG files instead. + + + - The `setSignatureAsync` method doesn't support inline CSS. Use internal or external CSS instead. + + + **Errors**: + + + - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. + + + - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the + message body is in plain text. + isPreview: false + isDeprecated: false + syntax: + content: 'setSignatureAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: >- + The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.categories.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.categories.yml new file mode 100644 index 0000000000..1c6ee11c69 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.categories.yml @@ -0,0 +1,415 @@ +### YamlMime:TSType +name: Office.Categories +uid: 'outlook!Office.Categories:interface' +package: outlook! +fullName: Office.Categories +summary: >- + Represents the categories on an item. + + + In Outlook, a user can tag messages and appointments by using a category to color-code them. The user defines + [categories in a master list](xref:outlook!Office.MasterCategories:interface) on their mailbox. They can then apply + one or more categories to an item. + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API to + manage categories applied to a message in Compose mode. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'addAsync(categories, options, callback)' + uid: 'outlook!Office.Categories#addAsync:member(1)' + package: outlook! + fullName: 'addAsync(categories, options, callback)' + summary: >- + Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a + unique name but multiple categories can use the same color. + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message or appointment item in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `InvalidCategory`: Invalid categories were provided. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-categories.yaml + + + // Note: In order for you to successfully add a category, + + // it must be in the mailbox categories master list. + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const masterCategories = asyncResult.value; + if (masterCategories && masterCategories.length > 0) { + // Grab the first category from the master list. + const categoryToAdd = [masterCategories[0].displayName]; + Office.context.mailbox.item.categories.addAsync(categoryToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully assigned category '${categoryToAdd}' to item.`); + } else { + console.log("categories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories in the master list on this mailbox. You can add categories using Office.context.mailbox.masterCategories.addAsync."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: categories + description: The categories to be added to the item. + type: 'string[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addAsync(categories, callback)' + uid: 'outlook!Office.Categories#addAsync:member(2)' + package: outlook! + fullName: 'addAsync(categories, callback)' + summary: >- + Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a + unique name but multiple categories can use the same color. + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message or appointment item in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `InvalidCategory`: Invalid categories were provided. + isPreview: false + isDeprecated: false + syntax: + content: 'addAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: categories + description: The categories to be added to the item. + type: 'string[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Categories#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets an item's categories. + + + **Important**: + + + - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook + version so make sure to handle both cases. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will + contain an error code. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Categories#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets an item's categories. + + + **Important**: + + + - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook + version so make sure to handle both cases. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Categories assigned to this item:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will + contain an error code. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'removeAsync(categories, options, callback)' + uid: 'outlook!Office.Categories#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(categories, options, callback)' + summary: >- + Removes categories from an item. + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[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/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + // Grab the first category assigned to this item. + const categoryToRemove = [categories[0].displayName]; + Office.context.mailbox.item.categories.removeAsync(categoryToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully unassigned category '${categoryToRemove}' from this item.`); + } else { + console.log("categories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: categories + description: The categories to be removed from the item. + type: 'string[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(categories, callback)' + uid: 'outlook!Office.Categories#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(categories, callback)' + summary: >- + Removes categories from an item. + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories applied to a message in Compose mode. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: categories + description: The categories to be removed from the item. + type: 'string[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.categorydetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.categorydetails.yml new file mode 100644 index 0000000000..56d519b98d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.categorydetails.yml @@ -0,0 +1,61 @@ +### YamlMime:TSType +name: Office.CategoryDetails +uid: 'outlook!Office.CategoryDetails:interface' +package: outlook! +fullName: Office.CategoryDetails +summary: Represents a category's details like name and associated color. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + const categories = [ + { + "displayName": "Urgent!", + "color": Office.MailboxEnums.CategoryColor.Preset0 + } + ]; + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: color + uid: 'outlook!Office.CategoryDetails#color:member' + package: outlook! + fullName: color + summary: The color of the category. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'color: MailboxEnums.CategoryColor | string;' + return: + type: ' | string' + - name: displayName + uid: 'outlook!Office.CategoryDetails#displayName:member' + package: outlook! + fullName: displayName + summary: The name of the category. Maximum length is 255 characters. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'displayName: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.coerciontypeoptions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.coerciontypeoptions.yml new file mode 100644 index 0000000000..f3bba8a252 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.coerciontypeoptions.yml @@ -0,0 +1,23 @@ +### YamlMime:TSType +name: Office.CoercionTypeOptions +uid: 'outlook!Office.CoercionTypeOptions:interface' +package: outlook! +fullName: Office.CoercionTypeOptions +summary: Provides an option for the data format. +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: coercionType + uid: 'outlook!Office.CoercionTypeOptions#coercionType:member' + package: outlook! + fullName: coercionType + summary: The desired data format. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'coercionType?: Office.CoercionType | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.contact.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.contact.yml new file mode 100644 index 0000000000..10306e8790 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.contact.yml @@ -0,0 +1,247 @@ +### YamlMime:TSType +name: Office.Contact +uid: 'outlook!Office.Contact:interface' +package: outlook! +fullName: Office.Contact +summary: >- + Represents the details about a contact (similar to what's on a physical contact or business card) extracted from the + item's body. Read mode only. + + + The list of contacts extracted from the body of an email message or appointment is returned in the `contacts` property + of the [Entities](xref:outlook!Office.Entities:interface) object returned by the `getEntities` or `getEntitiesByType` + method of the current item. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this + feature will start in May and continue until the end of June. After June, contextual add-ins will no longer be able to + detect entities in mail items to perform tasks on them. The following APIs will also be retired. + + + - `Office.context.mailbox.item.getEntities` - `Office.context.mailbox.item.getEntitiesByType` - + `Office.context.mailbox.item.getFilteredEntitiesByName` - `Office.context.mailbox.item.getSelectedEntities` + + + To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins + are retired. + + + - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is + being developed. Once support for entity-based contextual add-ins ends, online meeting add-ins will automatically + transition to the alternative implementation to activate the **Join Meeting** button. + + + - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We + recommend updating your contextual add-in to use regular expression rules as an alternative solution. For guidance on + how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + For more information, see [Retirement of entity-based contextual Outlook + add-ins](https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins). + + + #### Examples + + + ```TypeScript + + const item = Office.context.mailbox.item; + + // Get an array of strings that represent contacts in the current item's body. + + const contacts = item.getEntitiesByType(Office.MailboxEnums.EntityType.Contact); + + console.log("There are " + contacts.length + " contacts.") + + contacts.forEach(function (contact) { + console.log("Person name: " + JSON.stringify(contact.personName)); + console.log("Business name: " + JSON.stringify(contact.businessName)); + console.log("Addresses: " + JSON.stringify(contact.addresses)); + console.log("Phone numbers: " + JSON.stringify(contact.phoneNumbers)); + console.log("Email addresses: " + JSON.stringify(contact.emailAddresses)); + console.log("Urls: " + JSON.stringify(contact.urls)); + }); + + + /* Example email that includes contact details of sender, John Smith: + + Hi there, + + I have received the package. + + + Thanks. + + John Smith + + Account Manager + + Contoso Corporation + + 1 Contoso Way, Redmond, WA 98052 + + john.smith@contoso.com + + 111-111-1111 + + https://contoso.com/john.smith + + */ + + ``` +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +type: interface +properties: + - name: addresses + uid: 'outlook!Office.Contact#addresses:member' + package: outlook! + fullName: addresses + summary: >- + An array of strings containing the mailing and street addresses associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'addresses: string[];' + return: + type: 'string[]' + - name: businessName + uid: 'outlook!Office.Contact#businessName:member' + package: outlook! + fullName: businessName + summary: >- + A string containing the name of the business associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'businessName: string;' + return: + type: string + - name: emailAddresses + uid: 'outlook!Office.Contact#emailAddresses:member' + package: outlook! + fullName: emailAddresses + summary: >- + An array of strings containing the SMTP email addresses associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'emailAddresses: string[];' + return: + type: 'string[]' + - name: personName + uid: 'outlook!Office.Contact#personName:member' + package: outlook! + fullName: personName + summary: >- + A string containing the name of the person associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'personName: string;' + return: + type: string + - name: phoneNumbers + uid: 'outlook!Office.Contact#phoneNumbers:member' + package: outlook! + fullName: phoneNumbers + summary: >- + An array containing a `PhoneNumber` object for each phone number associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'phoneNumbers: PhoneNumber[];' + return: + type: '[]' + - name: urls + uid: 'outlook!Office.Contact#urls:member' + package: outlook! + fullName: urls + summary: >- + An array of strings containing the Internet URLs associated with the contact. Nullable. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'urls: string[];' + return: + type: 'string[]' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.customproperties.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.customproperties.yml new file mode 100644 index 0000000000..36c8d83cb9 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.customproperties.yml @@ -0,0 +1,363 @@ +### YamlMime:TSType +name: Office.CustomProperties +uid: 'outlook!Office.CustomProperties:interface' +package: outlook! +fullName: Office.CustomProperties +summary: >- + The `CustomProperties` object represents custom properties that are specific to a particular mail item and specific to + an Outlook add-in. For example, there might be a need for an add-in to save some data that's specific to the current + message that activated the add-in. If the user revisits the same message in the future and activates the add-in again, + the add-in will be able to retrieve the data that had been saved as custom properties. + + + To learn more about `CustomProperties`, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + When using custom properties in your add-in, keep in mind that: + + + - Custom properties saved while in compose mode aren't transmitted to recipients of the mail item. When a message or + appointment with custom properties is sent, its properties can be accessed from the item in the Sent Items folder. If + you want to make custom data accessible to recipients, consider using + [InternetHeaders](https://learn.microsoft.com/javascript/api/outlook/office.internetheaders) instead. + + + - The maximum length of a `CustomProperties` JSON object is 2500 characters. + + + - Outlook on Mac doesn't cache custom properties. If the user's network goes down, mail add-ins can't access their + custom properties. + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: get(name) + uid: 'outlook!Office.CustomProperties#get:member(1)' + package: outlook! + fullName: get(name) + summary: Returns the value of the specified custom property. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/15-item-custom-properties/load-set-get-save.yaml + + + const propertyName = $("#get-property-name").val(); + + const propertyValue = customProps.get(propertyName); + + console.log(`The value of custom property "${propertyName}" is "${propertyValue}".`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'get(name: string): any;' + parameters: + - id: name + description: The name of the custom property to be returned. + type: string + return: + type: any + description: The value of the specified custom property. + - name: getAll() + uid: 'outlook!Office.CustomProperties#getAll:member(1)' + package: outlook! + fullName: getAll() + summary: |- + Returns an object with all custom properties in a collection of name/value pairs. The following are equivalent. + + `customProps.get("name")` + + `var dictionary = customProps.getAll(); dictionary["name"]` + + You can iterate through the dictionary object to discover all `names` and `values`. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/15-item-custom-properties/load-set-get-save.yaml + + + let allCustomProps; + + if (Office.context.requirements.isSetSupported("Mailbox", "1.9")) { + allCustomProps = customProps.getAll(); + } else { + allCustomProps = customProps["rawData"]; + } + + + console.log(allCustomProps); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAll(): any;' + return: + type: any + description: An object with all custom properties in a collection of name/value pairs. + - name: remove(name) + uid: 'outlook!Office.CustomProperties#remove:member(1)' + package: outlook! + fullName: remove(name) + summary: >- + Removes the specified property from the custom property collection. + + + To make the removal of the property permanent, you must call the `saveAsync` method of the `CustomProperties` + object. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/15-item-custom-properties/load-set-get-save.yaml + + + const propertyName = $("#remove-property-name").val(); + + customProps.remove(propertyName); + + console.log(`Custom property "${propertyName}" removed.`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'remove(name: string): void;' + parameters: + - id: name + description: The `name` of the property to be removed. + type: string + return: + type: void + description: '' + - name: 'saveAsync(callback, asyncContext)' + uid: 'outlook!Office.CustomProperties#saveAsync:member(1)' + package: outlook! + fullName: 'saveAsync(callback, asyncContext)' + summary: >- + Saves custom properties to a message or appointment. + + + You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of + the `CustomProperties` object. The saving action is asynchronous. + + + It's a good practice to have your callback function check for and handle errors from `saveAsync`. In + particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently + the user becomes disconnected. If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would + return an error. Your callback function should handle this error accordingly. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **Important**: In Outlook on Windows, custom properties saved while in compose mode only persist after the + item being composed is closed or after `Office.context.mailbox.item.saveAsync` is called. + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/15-item-custom-properties/load-set-get-save.yaml + + + customProps.saveAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`saveAsync failed with message ${result.error.message}`); + return; + } + + console.log(`Custom properties saved with status: ${result.status}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(callback: (asyncResult: Office.AsyncResult) => void, asyncContext?: any): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + - id: asyncContext + description: Optional. Any state data that is passed to the callback function. + type: any + return: + type: void + description: '' + - name: saveAsync(asyncContext) + uid: 'outlook!Office.CustomProperties#saveAsync:member(2)' + package: outlook! + fullName: saveAsync(asyncContext) + summary: >- + Saves custom properties to a message or appointment. + + + You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of + the `CustomProperties` object. The saving action is asynchronous. + + + It's a good practice to have your callback function check for and handle errors from `saveAsync`. In + particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently + the user becomes disconnected. If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would + return an error. Your callback function should handle this error accordingly. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(asyncContext?: any): void;' + parameters: + - id: asyncContext + description: Optional. Any state data that is passed to the callback function. + type: any + return: + type: void + description: '' + - name: 'set(name, value)' + uid: 'outlook!Office.CustomProperties#set:member(1)' + package: outlook! + fullName: 'set(name, value)' + summary: >- + Sets the specified property to the specified value. + + + The `set` method sets the specified property to the specified value. To ensure that the set property and value + persist on the mail item, you must call the `saveAsync` method. + + + The `set` method creates a new property if the specified property does not already exist; otherwise, the existing + value is replaced with the new value. The `value` parameter can be of any type; however, it is always passed to + the server as a string. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/15-item-custom-properties/load-set-get-save.yaml + + + const propertyName = $("#set-property-name").val(); + + const propertyValue = $("#property-value").val(); + + customProps.set(propertyName, propertyValue); + + console.log(`Custom property "${propertyName}" set to value "${propertyValue}".`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'set(name: string, value: string): void;' + parameters: + - id: name + description: The name of the property to be set. + type: string + - id: value + description: The value of the property to be set. + type: string + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.delaydeliverytime.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.delaydeliverytime.yml new file mode 100644 index 0000000000..129d03028d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.delaydeliverytime.yml @@ -0,0 +1,262 @@ +### YamlMime:TSType +name: Office.DelayDeliveryTime +uid: 'outlook!Office.DelayDeliveryTime:interface' +package: outlook! +fullName: Office.DelayDeliveryTime +summary: The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message. +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.DelayDeliveryTime#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets the delivery date and time of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a + message is returned in the `asyncResult.value` property. If a delivery date hasn't been set on a message + yet, `0` is returned instead. + type: '(asyncResult: <Date | 0>) => void' + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.DelayDeliveryTime#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets the delivery date and time of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/delay-message-delivery.yaml + + + // This snippet gets the delivery date and time of a message. + + Office.context.mailbox.item.delayDeliveryTime.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + const deliveryDate = asyncResult.value; + if (deliveryDate === 0) { + console.log("Your message will be delivered immediately when you select Send."); + } else { + const date = new Date(deliveryDate); + console.log(`Message delivery date and time: ${date.toString()}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a + message is returned in the `asyncResult.value` property. If a delivery date hasn't been set on a message + yet, `0` is returned instead. + type: '(asyncResult: <Date | 0>) => void' + return: + type: void + description: '' + - name: 'setAsync(datetime, options, callback)' + uid: 'outlook!Office.DelayDeliveryTime#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(datetime, options, callback)' + summary: Sets the delivery date and time of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay + is processed on the server. This allows the message to be sent even if the Outlook client isn't running. In + classic Outlook on Windows, the message doesn't appear in the **Outbox** folder, so you won't be able to edit + the message or cancel its delivery after selecting **Send**. You'll only be able to review the message from + the **Sent Items** folder. In Outlook on the web, on Mac, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the message appears + in the **Drafts** folder until the scheduled delivery time. While it's in the **Drafts** folder, you'll be + able to edit the message before it's sent. To learn more, see [Manage the delivery date and time of a + message](https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery). + + + **Errors**: + + + - `InvalidFormatError` - The format of the specified data object is not valid. + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(datetime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: datetime + description: The future date and time when the message should be sent. + type: Date + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be + provided in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(datetime, callback)' + uid: 'outlook!Office.DelayDeliveryTime#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(datetime, callback)' + summary: Sets the delivery date and time of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay + is processed on the server. This allows the message to be sent even if the Outlook client isn't running. In + classic Outlook on Windows, the message doesn't appear in the **Outbox** folder, so you won't be able to edit + the message or cancel its delivery after selecting **Send**. You'll only be able to review the message from + the **Sent Items** folder. In Outlook on the web, on Mac, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the message appears + in the **Drafts** folder until the scheduled delivery time. While it's in the **Drafts** folder, you'll be + able to edit the message before it's sent. To learn more, see [Manage the delivery date and time of a + message](https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery). + + + **Errors**: + + + - `InvalidFormatError` - The format of the specified data object is not valid. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/delay-message-delivery.yaml + + + function setDeliveryDate(minutes) { + // This snippet sets the delivery date and time of a message. + const currentTime = new Date().getTime(); + const milliseconds = totalDelay * 60000; + const timeDelay = new Date(currentTime + milliseconds); + Office.context.mailbox.item.delayDeliveryTime.setAsync(timeDelay, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + if (minutes === 1440) { + console.log(`Delayed delivery by an additional one day.`); + } else { + console.log(`Delayed delivery by an additional ${minutes} minutes.`); + } + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(datetime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: datetime + description: The future date and time when the message should be sent. + type: Date + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be + provided in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.diagnostics.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.diagnostics.yml new file mode 100644 index 0000000000..379fae9fa5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.diagnostics.yml @@ -0,0 +1,178 @@ +### YamlMime:TSType +name: Office.Diagnostics +uid: 'outlook!Office.Diagnostics:interface' +package: outlook! +fullName: Office.Diagnostics +summary: Provides diagnostic information to an Outlook add-in. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + Starting with Mailbox requirement set 1.5, you can also use the + [Office.context.diagnostics](https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member) + property to get similar information. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml + + + // This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the + console. + + const diagnostics = Office.context.mailbox.diagnostics; + + console.log(`Client application: ${diagnostics.hostName}`); + + console.log(`Client version: ${diagnostics.hostVersion}`); + + + switch (diagnostics.OWAView) { + case undefined: + console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use."); + break; + case Office.MailboxEnums.OWAView.OneColumnNarrow: + console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.OneColumn: + console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.TwoColumns: + console.log("Current view (Outlook on the web only): Viewed from a tablet"); + break; + case Office.MailboxEnums.OWAView.ThreeColumns: + console.log("Current view (Outlook on the web only): Viewed from a desktop computer"); + break; + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: hostName + uid: 'outlook!Office.Diagnostics#hostName:member' + package: outlook! + fullName: hostName + summary: >- + Gets a string that represents the type of Outlook client. + + + The string can be one of the following values: `Outlook`, `newOutlookWindows`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: The `Outlook` value is returned for Outlook on Windows (classic) and on Mac. + `newOutlookWindows` is returned for [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627). + isPreview: false + isDeprecated: false + syntax: + content: 'hostName: string;' + return: + type: string + - name: hostVersion + uid: 'outlook!Office.Diagnostics#hostVersion:member' + package: outlook! + fullName: hostVersion + summary: >- + Gets a string that represents the version of either the Outlook client or the Exchange Server (for example, + "15.0.468.0"). + + + If the mail add-in is running in Outlook on Windows (classic), on Mac, or on mobile devices, the `hostVersion` + property returns the version of the Outlook client. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the property returns + the version of the Exchange Server. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'hostVersion: string;' + return: + type: string + - name: OWAView + uid: 'outlook!Office.Diagnostics#OWAView:member' + package: outlook! + fullName: OWAView + summary: >- + Gets a string that represents the current view of Outlook on the web. + + + The returned string can be one of the following values: `OneColumn`, `TwoColumns`, or + `ThreeColumns`. + + + If the application is not Outlook on the web, then accessing this property results in undefined. + + + Outlook on the web has three views that correspond to the width of the screen and the window, and the number of + columns that can be displayed: + + + - `OneColumn`, which is displayed when the screen is narrow. Outlook on the web uses this single-column + layout on the entire screen of a smartphone. + + + - `TwoColumns`, which is displayed when the screen is wider. Outlook on the web uses this view on most + tablets. + + + - `ThreeColumns`, which is displayed when the screen is wide. For example, Outlook on the web uses this + view in a full screen window on a desktop computer. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns";' + return: + type: ' | "OneColumn" | "TwoColumns" | "ThreeColumns"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailaddressdetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailaddressdetails.yml new file mode 100644 index 0000000000..9e5979afd6 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailaddressdetails.yml @@ -0,0 +1,133 @@ +### YamlMime:TSType +name: Office.EmailAddressDetails +uid: 'outlook!Office.EmailAddressDetails:interface' +package: outlook! +fullName: Office.EmailAddressDetails +summary: Provides the email properties of the sender or specified recipients of an email message or appointment. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +properties: + - name: appointmentResponse + uid: 'outlook!Office.EmailAddressDetails#appointmentResponse:member' + package: outlook! + fullName: appointmentResponse + summary: >- + Gets the response that an attendee returned for an appointment. This property applies to only an attendee of an + appointment, as represented by the `optionalAttendees` or `requiredAttendees` property. This property returns + undefined in other scenarios. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'appointmentResponse: MailboxEnums.ResponseType | string;' + return: + type: ' | string' + description: |- + + + #### Examples + + ```TypeScript + // The following sample provides the responses from required attendees. + // Note that this sample needs the add-in to be in Appointment Read (Attendee) mode. + const requiredAttendees = Office.context.mailbox.item.requiredAttendees; + console.log("There are " + requiredAttendees.length + " required attendees.") + requiredAttendees.forEach(function (requiredAttendee) { + console.log("Attendee " + requiredAttendee.displayName + ": " + requiredAttendee.appointmentResponse); + }); + ``` + - name: displayName + uid: 'outlook!Office.EmailAddressDetails#displayName:member' + package: outlook! + fullName: displayName + summary: Gets the display name associated with an email address. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'displayName: string;' + return: + type: string + description: |- + + + #### Examples + + ```TypeScript + const organizerName = Office.context.mailbox.item.organizer.displayName; + console.log("Organizer: " + organizerName); + ``` + - name: emailAddress + uid: 'outlook!Office.EmailAddressDetails#emailAddress:member' + package: outlook! + fullName: emailAddress + summary: Gets the SMTP email address. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'emailAddress: string;' + return: + type: string + description: |- + + + #### Examples + + ```TypeScript + const organizerAddress = Office.context.mailbox.item.organizer.emailAddress; + console.log("Organizer's email address: " + organizerAddress); + ``` + - name: recipientType + uid: 'outlook!Office.EmailAddressDetails#recipientType:member' + package: outlook! + fullName: recipientType + summary: Gets the email address type of a recipient. + remarks: >- + **Important**: + + + - A `recipientType` property value isn't returned by the + [Office.context.mailbox.item.from.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1)) + and + [Office.context.mailbox.item.organizer.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1)) + methods. The email sender or appointment organizer is always a user whose email address is on the Exchange server. + + + - While composing a mail item, when you switch to a sender account that's on a different domain than that of the + previously selected sender account, the value of the `recipientType` property for existing recipients isn't + updated and will still be based on the domain of the previously selected account. To get the correct recipient + types after switching accounts, you must first remove the existing recipients, then add them back to the mail + item. + + + #### Examples + + + ```TypeScript + + const requiredAttendees = Office.context.mailbox.item.requiredAttendees; + + console.log("There are " + requiredAttendees.length + " required attendees.") + + requiredAttendees.forEach(function (requiredAttendee) { + console.log("Attendee " + requiredAttendee.displayName + ": " + requiredAttendee.recipientType); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'recipientType: MailboxEnums.RecipientType | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailuser.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailuser.yml new file mode 100644 index 0000000000..ff94b1218e --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.emailuser.yml @@ -0,0 +1,74 @@ +### YamlMime:TSType +name: Office.EmailUser +uid: 'outlook!Office.EmailUser:interface' +package: outlook! +fullName: Office.EmailUser +summary: Represents an email account on an Exchange Server. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + #### Examples + + + ```TypeScript + + // Add recipients to the To field of an email. + + const recipients: Office.EmailUser[] = [ + { + "displayName": "Allie Bellew", + "emailAddress": "allieb@contoso.com" + }, + { + "displayName": "Alex Darrow", + "emailAddress": "alexd@contoso.com" + } + ]; + + + Office.context.mailbox.item.to.addAsync(recipients, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + console.log("Recipients added to the To field."); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayName + uid: 'outlook!Office.EmailUser#displayName:member' + package: outlook! + fullName: displayName + summary: Gets the display name associated with an email address. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'displayName: string;' + return: + type: string + - name: emailAddress + uid: 'outlook!Office.EmailUser#emailAddress:member' + package: outlook! + fullName: emailAddress + summary: Gets the SMTP email address. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'emailAddress: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocation.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocation.yml new file mode 100644 index 0000000000..6b4484ad51 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocation.yml @@ -0,0 +1,371 @@ +### YamlMime:TSType +name: Office.EnhancedLocation +uid: 'outlook!Office.EnhancedLocation:interface' +package: outlook! +fullName: Office.EnhancedLocation +summary: Represents the set of locations on an appointment. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'addAsync(locationIdentifiers, options, callback)' + uid: 'outlook!Office.EnhancedLocation#addAsync:member(1)' + package: outlook! + fullName: 'addAsync(locationIdentifiers, options, callback)' + summary: Adds to the set of locations associated with the appointment. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidFormatError`: The format of the specified data object is not valid. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + const locations = [ + { + id: "Contoso", + type: Office.MailboxEnums.LocationType.Custom + }, + { + id: "room500@test.com", + type: Office.MailboxEnums.LocationType.Room + } + ]; + + Office.context.mailbox.item.enhancedLocation.addAsync(locations, (result) => { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully added locations ${JSON.stringify(locations)}`); + } else { + console.error(`Failed to add locations. Error message: ${result.error.message}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: locationIdentifiers + description: The locations to be added to the current list of locations. + type: '[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of + `asyncResult` to determine if the call succeeded. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addAsync(locationIdentifiers, callback)' + uid: 'outlook!Office.EnhancedLocation#addAsync:member(2)' + package: outlook! + fullName: 'addAsync(locationIdentifiers, callback)' + summary: Adds to the set of locations associated with the appointment. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidFormatError`: The format of the specified data object is not valid. + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: locationIdentifiers + description: The locations to be added to the current list of locations. + type: '[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of + `asyncResult` to determine if the call succeeded. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.EnhancedLocation#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the set of locations associated with the appointment. + + + **Note**: [Personal contact groups](https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023) + added as appointment locations aren't returned by this method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + Office.context.mailbox.item.enhancedLocation.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to get locations. Error message: ${result.error.message}`); + return; + } + const places = result.value; + if (places && places.length > 0) { + result.value.forEach(function(place) { + console.log(`Location: ${place.displayName} (type: ${place.locationIdentifier.type})`); + if (place.locationIdentifier.type === Office.MailboxEnums.LocationType.Room) { + console.log("Email address: " + place.emailAddress); + } + }); + } else { + console.log("There are no locations."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.EnhancedLocation#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the set of locations associated with the appointment. + + + **Note**: [Personal contact groups](https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023) + added as appointment locations aren't returned by this method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'removeAsync(locationIdentifiers, options, callback)' + uid: 'outlook!Office.EnhancedLocation#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(locationIdentifiers, options, callback)' + summary: >- + Removes the set of locations associated with the appointment. + + + If there are multiple locations with the same name, all matching locations will be removed even if only one was + specified in `locationIdentifiers`. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + const locations = [ + { + id: "Contoso", + type: Office.MailboxEnums.LocationType.Custom + }, + { + id: "room500@test.com", + type: Office.MailboxEnums.LocationType.Room + } + ]; + + Office.context.mailbox.item.enhancedLocation.removeAsync(locations, (result) => { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully removed locations ${JSON.stringify(locations)}`); + } else { + console.error(`Failed to remove locations. Error message: ${result.error.message}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(locationIdentifiers: LocationIdentifier[], options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: locationIdentifiers + description: The locations to be removed from the current list of locations. + type: '[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of + `asyncResult` to determine if the call succeeded. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(locationIdentifiers, callback)' + uid: 'outlook!Office.EnhancedLocation#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(locationIdentifiers, callback)' + summary: >- + Removes the set of locations associated with the appointment. + + + If there are multiple locations with the same name, all matching locations will be removed even if only one was + specified in `locationIdentifiers`. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: locationIdentifiers + description: The locations to be removed from the current list of locations. + type: '[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of + `asyncResult` to determine if the call succeeded. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocationschangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocationschangedeventargs.yml new file mode 100644 index 0000000000..b0d0b1b694 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.enhancedlocationschangedeventargs.yml @@ -0,0 +1,72 @@ +### YamlMime:TSType +name: Office.EnhancedLocationsChangedEventArgs +uid: 'outlook!Office.EnhancedLocationsChangedEventArgs:interface' +package: outlook! +fullName: Office.EnhancedLocationsChangedEventArgs +summary: Provides the current enhanced locations when the `Office.EventType.EnhancedLocationsChanged` event is raised. +remarks: |- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Adds an event handler for the EnhancedLocationsChanged event. + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.EnhancedLocationsChanged, enhancedLocationsChangedHandler, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Failed to add event handler: ${asyncResult.error.message}`); + return; + } + + console.log("Event handler added successfully."); + }); + }); + }); + + // Handles the EnhancedLocationsChanged event. + function enhancedLocationsChangedHandler(event) { + console.log(`Event: ${event.type}`); + const enhancedLocations = event.enhancedLocations; + enhancedLocations.forEach((location) => { + console.log(`Display name: ${location.displayName}`); + const locationType = location.locationIdentifier.type; + console.log(`Type: ${locationType}`); + if (locationType === Office.MailboxEnums.LocationType.Room) { + console.log(`Email address: ${location.emailAddress}`); + } + }); + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: enhancedLocations + uid: 'outlook!Office.EnhancedLocationsChangedEventArgs#enhancedLocations:member' + package: outlook! + fullName: enhancedLocations + summary: Gets the set of enhanced locations. + remarks: '\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'enhancedLocations: LocationDetails[];' + return: + type: '[]' + - name: type + uid: 'outlook!Office.EnhancedLocationsChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkEnhancedLocationsChanged";' + return: + type: '"olkEnhancedLocationsChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.entities.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.entities.yml new file mode 100644 index 0000000000..2216a1f191 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.entities.yml @@ -0,0 +1,272 @@ +### YamlMime:TSType +name: Office.Entities +uid: 'outlook!Office.Entities:interface' +package: outlook! +fullName: Office.Entities +summary: >- + Represents a collection of entities found in an email message or appointment. Read mode only. + + + The `Entities` object is a container for the entity arrays returned by the `getEntities` and `getEntitiesByType` + methods when the item (either an email message or an appointment) contains one or more entities that have been found + by the server. You can use these entities in your code to provide additional context information to the viewer, such + as a map to an address found in the item, or to open a dialer for a phone number found in the item. + + + If no entities of the type specified in the property are present in the item, the property associated with that entity + is null. For example, if a message contains a street address and a phone number, the addresses property and + phoneNumbers property would contain information, and the other properties would be null. + + + To be recognized as an address, the string must contain a United States postal address that has at least a subset of + the elements of a street number, street name, city, state, and zip code. + + + To be recognized as a phone number, the string must contain a North American phone number format. + + + Entity recognition relies on natural language recognition that is based on machine learning of large amounts of data. + The recognition of an entity is non-deterministic and success sometimes relies on the particular context in the item. + + + When the property arrays are returned by the `getEntitiesByType` method, only the property for the specified entity + contains data; all other properties are null. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +type: interface +properties: + - name: addresses + uid: 'outlook!Office.Entities#addresses:member' + package: outlook! + fullName: addresses + summary: >- + Gets the physical addresses (street or mailing addresses) found in an email message or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'addresses: string[];' + return: + type: 'string[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const addresses = item.getEntitiesByType(Office.MailboxEnums.EntityType.Address); + ``` + - name: contacts + uid: 'outlook!Office.Entities#contacts:member' + package: outlook! + fullName: contacts + summary: >- + Gets the contacts found in an email address or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'contacts: Contact[];' + return: + type: '[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const contacts = item.getEntitiesByType(Office.MailboxEnums.EntityType.Contact); + ``` + - name: emailAddresses + uid: 'outlook!Office.Entities#emailAddresses:member' + package: outlook! + fullName: emailAddresses + summary: >- + Gets the email addresses found in an email message or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'emailAddresses: string[];' + return: + type: 'string[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const emailAddresses = item.getEntitiesByType(Office.MailboxEnums.EntityType.EmailAddress); + ``` + - name: meetingSuggestions + uid: 'outlook!Office.Entities#meetingSuggestions:member' + package: outlook! + fullName: meetingSuggestions + summary: >- + Gets the meeting suggestions found in an email message. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'meetingSuggestions: MeetingSuggestion[];' + return: + type: '[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const meetingSuggestions = item.getEntitiesByType(Office.MailboxEnums.EntityType.MeetingSuggestion); + ``` + - name: phoneNumbers + uid: 'outlook!Office.Entities#phoneNumbers:member' + package: outlook! + fullName: phoneNumbers + summary: >- + Gets the phone numbers found in an email message or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'phoneNumbers: PhoneNumber[];' + return: + type: '[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const phoneNumbers = item.getEntitiesByType(Office.MailboxEnums.EntityType.PhoneNumber); + ``` + - name: taskSuggestions + uid: 'outlook!Office.Entities#taskSuggestions:member' + package: outlook! + fullName: taskSuggestions + summary: >- + Gets the task suggestions found in an email message or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'taskSuggestions: string[];' + return: + type: 'string[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const taskSuggestions = item.getEntitiesByType(Office.MailboxEnums.EntityType.TaskSuggestion); + ``` + - name: urls + uid: 'outlook!Office.Entities#urls:member' + package: outlook! + fullName: urls + summary: >- + Gets the Internet URLs present in an email message or appointment. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'urls: string[];' + return: + type: 'string[]' + description: |- + + + #### Examples + + ```TypeScript + const item = Office.context.mailbox.item; + const urls = item.getEntitiesByType(Office.MailboxEnums.EntityType.Url); + ``` diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.from.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.from.yml new file mode 100644 index 0000000000..ddde529038 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.from.yml @@ -0,0 +1,165 @@ +### YamlMime:TSType +name: Office.From +uid: 'outlook!Office.From:interface' +package: outlook! +fullName: Office.From +summary: Provides a method to get the from value of a message in an Outlook add-in. +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + **Important**: This interface is supported in Outlook on Android and on iOS. For a sample scenario, see [Implement + event-based activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.From#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the from value of a message. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. + + + The from value of the item is provided as an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) in the `asyncResult.value` property. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - This method is supported in Outlook on Android and on iOS. For a sample scenario, see [Implement event-based + activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). To learn more about + APIs supported in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - A `recipientType` property value isn't returned by the `getAsync` method. The email sender is always a user + whose email address is on the Exchange server. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-from-message-compose.yaml + + + Office.context.mailbox.item.from.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgFrom = asyncResult.value; + console.log("Message from: " + msgFrom.displayName + " (" + msgFrom.emailAddress + ")"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the + result is the item's from value, as an `EmailAddressDetails` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.From#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the from value of a message. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. + + + The from value of the item is provided as an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) in the `asyncResult.value` property. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - This method is supported in Outlook on Android and on iOS. For a sample scenario, see [Implement event-based + activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). To learn more about + APIs supported in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - A `recipientType` property value isn't returned by the `getAsync` method. The email sender is always a user + whose email address is on the Exchange server. + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the + result is the item's from value, as an `EmailAddressDetails` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobarclickedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobarclickedeventargs.yml new file mode 100644 index 0000000000..afb2f06b35 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobarclickedeventargs.yml @@ -0,0 +1,66 @@ +### YamlMime:TSType +name: Office.InfobarClickedEventArgs +uid: 'outlook!Office.InfobarClickedEventArgs:interface' +package: outlook! +fullName: Office.InfobarClickedEventArgs +summary: Provides basic details about the notification message that raised the `Office.EventType.InfobarClicked` event. +remarks: |- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Adds an event handler for the InfobarClicked event. + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.InfobarClicked, infobarClickedHandler, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Failed to add event handler: ${asyncResult.error.message}`); + return; + } + + console.log("Event handler added successfully."); + }); + }); + }); + + // Handles the InfobarClicked event. + function infobarClickedHandler(event) { + console.log(`Event: ${event.type}`); + const infobarDetails = event.infobarDetails; + console.log(`Notification type: ${infobarDetails.infobarType}`); + console.log(`Action type: ${infobarDetails.actionType}`); + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: infobarDetails + uid: 'outlook!Office.InfobarClickedEventArgs#infobarDetails:member' + package: outlook! + fullName: infobarDetails + summary: Gets additional details about the notification message. + remarks: '\[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'infobarDetails: InfobarDetails;' + return: + type: '' + - name: type + uid: 'outlook!Office.InfobarClickedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkInfobarClicked";' + return: + type: '"olkInfobarClicked"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobardetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobardetails.yml new file mode 100644 index 0000000000..5871aa5ce8 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.infobardetails.yml @@ -0,0 +1,69 @@ +### YamlMime:TSType +name: Office.InfobarDetails +uid: 'outlook!Office.InfobarDetails:interface' +package: outlook! +fullName: Office.InfobarDetails +summary: Provides additional details about the notification message that raised the `Office.EventType.InfobarClicked` event. +remarks: |- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + /* + * This snippet activates when a notification message is dismissed from an Outlook message or appointment. + * The event handler logs the custom action and notification type to the console. + */ + Office.context.mailbox.item.addHandlerAsync(Office.EventType.InfobarClicked, eventHandler, callback); + + function eventHandler(event) { + const infobarDetails = event.infobarDetails; + + // Log the custom action type. + console.log(`Custom action type: ${infobarDetails.actionType}`); + + // Log the notification type. + switch (infobarDetails.infobarType) { + case Office.MailboxEnums.InfobarType.Error: + console.log("Notification type: Error message"); + break; + case Office.MailboxEnums.InfobarType.Informational: + console.log("Notification type: Informational message"); + break; + case Office.MailboxEnums.InfobarType.Insight: + console.log("Notification type: Informational message with available actions from the task pane"); + break; + case Office.MailboxEnums.InfobarType.ProgressIndicator: + console.log("Notification type: Progress indicator"); + break; + } + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: actionType + uid: 'outlook!Office.InfobarDetails#actionType:member' + package: outlook! + fullName: actionType + summary: 'The action type. Currently, "Dismiss" is the only supported action.' + remarks: '\[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'actionType: MailboxEnums.InfobarActionType;' + return: + type: '' + - name: infobarType + uid: 'outlook!Office.InfobarDetails#infobarType:member' + package: outlook! + fullName: infobarType + summary: The notification type. + remarks: '\[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'infobarType: MailboxEnums.InfobarType;' + return: + type: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.internetheaders.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.internetheaders.yml new file mode 100644 index 0000000000..9cbf2f3af4 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.internetheaders.yml @@ -0,0 +1,463 @@ +### YamlMime:TSType +name: Office.InternetHeaders +uid: 'outlook!Office.InternetHeaders:interface' +package: outlook! +fullName: Office.InternetHeaders +summary: >- + The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves + Exchange and is converted to a MIME message. + + + Internet headers are stored as string key-value pairs on a per-item basis. + + + **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see + [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported + in Outlook on mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Recommended practices**: + + + Currently, internet headers are a finite resource on a user's mailbox. When the quota is exhausted, you can't create + any more internet headers on that mailbox, which can result in unexpected behavior from clients that rely on this to + function. + + + Apply the following guidelines when you create internet headers in your add-in. + + + - Create the minimum number of headers required. The header quota is based on the total size of headers applied to a + message. In Exchange Online, the header limit is capped at 256 KB, while in an Exchange on-premises environment, the + limit is determined by your organization's administrator. For further information on header limits, see [Exchange + Online message + limits](https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits) + and [Exchange Server message + limits](https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits). + + + - Name headers so that you can reuse and update their values later. As such, avoid naming headers in a variable manner + (for example, based on user input or a timestamp). +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(names, options, callback)' + uid: 'outlook!Office.InternetHeaders#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(names, options, callback)' + summary: >- + Given an array of internet header names, this method returns a record containing those internet headers and their + values. If the add-in requests a header that isn't available, that header won't be returned in the results. + + + **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` + method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs + supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/70-mime-headers/manage-custom-internet-headers-message-compose.yaml + + + Office.context.mailbox.item.internetHeaders.getAsync( + ["preferred-fruit", "preferred-vegetable", "best-vegetable", "nonexistent-header"], + function (asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Selected headers: " + JSON.stringify(asyncResult.value)); + } else { + console.log("Error getting selected headers: " + JSON.stringify(asyncResult.error)); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(names: string[], options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult>) => void): void; + parameters: + - id: names + description: The names of the internet headers to be returned. + type: 'string[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of + internet headers are returned in the `asyncResult.value` property. Any errors encountered are provided in + the `asyncResult.error` property. + type: >- + (asyncResult: <Record<string, string>>) => + void + return: + type: void + description: '' + - name: 'getAsync(names, callback)' + uid: 'outlook!Office.InternetHeaders#getAsync:member(2)' + package: outlook! + fullName: 'getAsync(names, callback)' + summary: >- + Given an array of internet header names, this method returns a record containing those internet headers and their + values. If the add-in requests a header that isn't available, that header won't be returned in the results. + + + **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` + method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs + supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(names: string[], callback: (asyncResult: Office.AsyncResult>) => void): void;' + parameters: + - id: names + description: The names of the internet headers to be returned. + type: 'string[]' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of + internet headers are returned in the `asyncResult.value` property. Any errors encountered are provided in + the `asyncResult.error` property. + type: >- + (asyncResult: <Record<string, string>>) => + void + return: + type: void + description: '' + - name: 'removeAsync(names, options, callback)' + uid: 'outlook!Office.InternetHeaders#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(names, options, callback)' + summary: >- + Given an array of internet header names, this method removes the specified headers from the internet header + collection. + + + **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs + supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/70-mime-headers/manage-custom-internet-headers-message-compose.yaml + + + Office.context.mailbox.item.internetHeaders.removeAsync( + ["best-vegetable", "nonexistent-header"], + function (asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully removed selected headers"); + } else { + console.log("Error removing selected headers: " + JSON.stringify(asyncResult.error)); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(names: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: names + description: The names of the internet headers to be removed. + type: 'string[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided + in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(names, callback)' + uid: 'outlook!Office.InternetHeaders#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(names, callback)' + summary: >- + Given an array of internet header names, this method removes the specified headers from the internet header + collection. + + + **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs + supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: 'removeAsync(names: string[], callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: names + description: The names of the internet headers to be removed. + type: 'string[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided + in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(headers, options, callback)' + uid: 'outlook!Office.InternetHeaders#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(headers, options, callback)' + summary: >- + Sets the specified internet headers to the specified values. + + + The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing + value is replaced with the new value. + + + **Note**: This method is intended to set the values of your custom headers. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. To learn + more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on + mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - The header quota is based on the total size of headers applied to a message. In Exchange Online, the header + limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your + organization's administrator. For further information on header limits, see [Exchange Online message + limits](https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits) + and [Exchange Server message + limits](https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/70-mime-headers/manage-custom-internet-headers-message-compose.yaml + + + Office.context.mailbox.item.internetHeaders.setAsync( + { "preferred-fruit": "orange", "preferred-vegetable": "broccoli", "best-vegetable": "spinach" }, + function (asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully set headers"); + } else { + console.log("Error setting headers: " + JSON.stringify(asyncResult.error)); + } + } + + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(headers: Record, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: headers + description: >- + The names and corresponding values of the headers to be set. This should be a record object with its keys + being internet header names and values being the corresponding header value strings. + type: 'Record<string, string>' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided + in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(headers, callback)' + uid: 'outlook!Office.InternetHeaders#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(headers, callback)' + summary: >- + Sets the specified internet headers to the specified values. + + + The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing + value is replaced with the new value. + + + **Note**: This method is intended to set the values of your custom headers. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. To learn + more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on + mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - The header quota is based on the total size of headers applied to a message. In Exchange Online, the header + limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your + organization's administrator. For further information on header limits, see [Exchange Online message + limits](https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits) + and [Exchange Server message + limits](https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits). + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(headers: Record, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: headers + description: >- + The names and corresponding values of the headers to be set. This should be a record object with its keys + being internet header names and values being the corresponding header value strings. + type: 'Record<string, string>' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided + in the `asyncResult.error` property. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.item.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.item.yml new file mode 100644 index 0000000000..9d199bda78 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.item.yml @@ -0,0 +1,63 @@ +### YamlMime:TSType +name: Office.Item +uid: 'outlook!Office.Item:interface' +package: outlook! +fullName: Office.Item +summary: >- + The item namespace is used to access the currently selected message, meeting request, or appointment. You can + determine the type of the item by using the `itemType` property. + + + To see the full member list, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + + + - [AppointmentCompose](xref:outlook!Office.AppointmentCompose:interface) + + + - [AppointmentRead](xref:outlook!Office.AppointmentRead:interface) + + + - [MessageCompose](xref:outlook!Office.MessageCompose:interface) + + + - [MessageRead](xref:outlook!Office.MessageRead:interface) +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Appointment Organizer, Appointment Attendee, Message Compose, Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` +isPreview: false +isDeprecated: false +type: interface diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemcompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemcompose.yml new file mode 100644 index 0000000000..a1345473f8 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemcompose.yml @@ -0,0 +1,27 @@ +### YamlMime:TSType +name: Office.ItemCompose +uid: 'outlook!Office.ItemCompose:interface' +package: outlook! +fullName: Office.ItemCompose +summary: >- + The compose mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Child interfaces: + + + - [AppointmentCompose](xref:outlook!Office.AppointmentCompose:interface) + + + - [MessageCompose](xref:outlook!Office.MessageCompose:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemread.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemread.yml new file mode 100644 index 0000000000..1fa086e69f --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.itemread.yml @@ -0,0 +1,27 @@ +### YamlMime:TSType +name: Office.ItemRead +uid: 'outlook!Office.ItemRead:interface' +package: outlook! +fullName: Office.ItemRead +summary: >- + The read mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Child interfaces: + + + - [AppointmentRead](xref:outlook!Office.AppointmentRead:interface) + + + - [MessageRead](xref:outlook!Office.MessageRead:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessagecompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessagecompose.yml new file mode 100644 index 0000000000..95b9cc6fda --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessagecompose.yml @@ -0,0 +1,1673 @@ +### YamlMime:TSType +name: Office.LoadedMessageCompose +uid: 'outlook!Office.LoadedMessageCompose:interface' +package: outlook! +fullName: Office.LoadedMessageCompose +summary: >- + Represents a message in compose mode that's currently loaded. A `LoadedMessageCompose` object is returned when + `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. +remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Message Compose + + + **Important**: + + + - When implementing the [item multi-select + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select), determine if you can + already access the required properties of the selected item through the `Office.context.mailbox.getSelectedItemsAsync` + call. If you can, you don't need to call `loadItemByIdAsync`. + + + - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call + `unloadAsync` after processing the item. This must be done before calling `loadItemByIdAsync` on another item. + + + #### Examples + + + ```TypeScript + + // Gets the sender's email address of each selected message. + + async function getSenderEmailAddress(item) { + const itemId = item.itemId; + await new Promise((resolve) => { + Office.context.mailbox.loadItemByIdAsync(itemId, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + const loadedItem = result.value; + const sender = loadedItem.from.emailAddress; + console.log(sender); + + // Unload the current message before processing another selected message. + loadedItem.unloadAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + resolve(); + }); + }); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bcc + uid: 'outlook!Office.LoadedMessageCompose#bcc:member' + package: outlook! + fullName: bcc + summary: Gets the recipients on the **Bcc** (blind carbon copy) line of a message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - Only the `getAsync` method of the Recipients object is supported. + + + - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more + information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. + isPreview: false + isDeprecated: false + syntax: + content: 'bcc: Recipients;' + return: + type: '' + - name: body + uid: 'outlook!Office.LoadedMessageCompose#body:member' + package: outlook! + fullName: body + summary: Gets the item's body and format. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.LoadedMessageCompose#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods to manage the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: cc + uid: 'outlook!Office.LoadedMessageCompose#cc:member' + package: outlook! + fullName: cc + summary: Gets recipients on the **Cc** (carbon copy) line of a message. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - Only the `getAsync` method of the Recipients object is supported. + + + - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more + information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. + isPreview: false + isDeprecated: false + syntax: + content: 'cc: Recipients;' + return: + type: '' + - name: conversationId + uid: 'outlook!Office.LoadedMessageCompose#conversationId:member' + package: outlook! + fullName: conversationId + summary: >- + Gets an identifier for the email conversation that contains a particular message. + + + You can get an integer for this property if your mail app is activated in read forms or responses in compose + forms. If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation + ID for that message will change and that value you obtained earlier will no longer apply. + + + You get null for this property for a new item in a compose form. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'conversationId: string;' + return: + type: string + - name: delayDeliveryTime + uid: 'outlook!Office.LoadedMessageCompose#delayDeliveryTime:member' + package: outlook! + fullName: delayDeliveryTime + summary: Gets the delayed delivery date and time of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: Only the `getAsync` method of the DelayDeliveryTime object is supported. + isPreview: false + isDeprecated: false + syntax: + content: 'delayDeliveryTime: DelayDeliveryTime;' + return: + type: '' + - name: from + uid: 'outlook!Office.LoadedMessageCompose#from:member' + package: outlook! + fullName: from + summary: Gets the email address of the sender of a message. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'from: From;' + return: + type: '' + - name: inReplyTo + uid: 'outlook!Office.LoadedMessageCompose#inReplyTo:member' + package: outlook! + fullName: inReplyTo + summary: Gets the message ID of the original message being replied to by the current message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the + user, such as changing the subject in a reply. + + + - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's + also the meeting organizer. + isPreview: false + isDeprecated: false + syntax: + content: 'inReplyTo: string;' + return: + type: string + - name: internetHeaders + uid: 'outlook!Office.LoadedMessageCompose#internetHeaders:member' + package: outlook! + fullName: internetHeaders + summary: >- + Gets the custom internet headers of a message. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: Only the `getAsync` method of the InternetHeaders object is supported. + isPreview: false + isDeprecated: false + syntax: + content: 'internetHeaders: InternetHeaders;' + return: + type: '' + - name: itemType + uid: 'outlook!Office.LoadedMessageCompose#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: notificationMessages + uid: 'outlook!Office.LoadedMessageCompose#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages of the item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: sensitivityLabel + uid: 'outlook!Office.LoadedMessageCompose#sensitivityLabel:member' + package: outlook! + fullName: sensitivityLabel + summary: Gets the sensitivity label of a message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + + + - Only the `getAsync` method of the SensitivityLabel object is supported. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + isPreview: false + isDeprecated: false + syntax: + content: 'sensitivityLabel: SensitivityLabel;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.LoadedMessageCompose#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web and on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), the `seriesId` + returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services + item identifier. The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. For more details, see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series + items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: subject + uid: 'outlook!Office.LoadedMessageCompose#subject:member' + package: outlook! + fullName: subject + summary: |- + Gets the description that appears in the subject field of an item. + + The `subject` property gets the entire subject of the item, as sent by the email server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: Only the `getAsync` method of the Subject object is supported. + isPreview: false + isDeprecated: false + syntax: + content: 'subject: Subject;' + return: + type: '' + - name: to + uid: 'outlook!Office.LoadedMessageCompose#to:member' + package: outlook! + fullName: to + summary: >- + Gets the recipients on the **To** line of a message. Provides access to the recipients on the **To** line + of a message. The type of object and level of access depend on the mode of the current item. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - Only the `getAsync` method of the Recipients object is supported. + + + - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. For more + information, see the [Recipients](xref:outlook!Office.Recipients:interface) object. + isPreview: false + isDeprecated: false + syntax: + content: 'to: Recipients;' + return: + type: '' +methods: + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentsAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getAttachmentsAsync:member(1)' + package: outlook! + fullName: 'getAttachmentsAsync(options, callback)' + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAttachmentsAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getAttachmentsAsync:member(2)' + package: outlook! + fullName: getAttachmentsAsync(callback) + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'getComposeTypeAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getComposeTypeAsync:member(1)' + package: outlook! + fullName: 'getComposeTypeAsync(options, callback)' + summary: >- + Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. The + coercion type can be HTML or plain text. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with + the item's compose type and coercion type. + type: '(asyncResult: <any>) => void' + return: + type: void + description: An object with `ComposeType` and `CoercionType` enum values for the message item. + - name: getComposeTypeAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getComposeTypeAsync:member(2)' + package: outlook! + fullName: getComposeTypeAsync(callback) + summary: >- + Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. The + coercion type can be HTML or plain text. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with + the item's compose type and coercion type. + type: '(asyncResult: <any>) => void' + return: + type: void + description: An object with `ComposeType` and `CoercionType` enum values for the message item. + - name: 'getConversationIndexAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getConversationIndexAsync:member(1)' + package: outlook! + fullName: 'getConversationIndexAsync(options, callback)' + summary: Gets the Base64-encoded position of the current message in a conversation thread. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its + contents to provide context for the current message being composed. + isPreview: false + isDeprecated: false + syntax: + content: >- + getConversationIndexAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded position of + the current message in a conversation is returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getConversationIndexAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getConversationIndexAsync:member(2)' + package: outlook! + fullName: getConversationIndexAsync(callback) + summary: Gets the Base64-encoded position of the current message in a conversation thread. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its + contents to provide context for the current message being composed. + isPreview: false + isDeprecated: false + syntax: + content: 'getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded position of + the current message in a conversation is returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getItemClassAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getItemClassAsync:member(1)' + package: outlook! + fullName: 'getItemClassAsync(options, callback)' + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + The following table lists the default message classes. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ isPreview: false + isDeprecated: false + syntax: + content: >- + getItemClassAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The message class is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getItemClassAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getItemClassAsync:member(2)' + package: outlook! + fullName: getItemClassAsync(callback) + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + The following table lists the default message classes. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ isPreview: false + isDeprecated: false + syntax: + content: 'getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The message class is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getItemIdAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getItemIdAsync:member(1)' + package: outlook! + fullName: 'getItemIdAsync(options, callback)' + summary: >- + Asynchronously gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of a saved item. + + + When invoked, this method returns the item ID via the callback function. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to use with + EWS or the REST API), be aware that when Outlook is in cached mode, it may take some time before the item is + synced to the server. Until the item is synced, the `itemId` isn't recognized and using it returns an error. + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + isPreview: false + isDeprecated: false + syntax: + content: >- + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` + property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getItemIdAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getItemIdAsync:member(2)' + package: outlook! + fullName: getItemIdAsync(callback) + summary: >- + Asynchronously gets the ID of a saved item. + + + When invoked, this method returns the item ID via the callback function. + + + **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to + use with EWS or the REST API), be aware that when Outlook is in cached mode, it may take some time before the item + is synced to the server. Until the item is synced, the `itemId` isn't recognized and using it returns an error. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + isPreview: false + isDeprecated: false + syntax: + content: 'getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic) unless the + following conditions are met. + + + a. **Delegate access/Shared folders** + + + 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + + + 3. The delegate opens the draft from the shared folder then continues composing. + + + b. **Shared mailbox (applies to classic Outlook on Windows only)** + + + 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + + + 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + + + The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared + properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic) unless the + following conditions are met. + + + a. **Delegate access/Shared folders** + + + 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + + + 3. The delegate opens the draft from the shared folder then continues composing. + + + b. **Shared mailbox (applies to Outlook on Windows only)** + + + 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + + + 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + + + The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared + properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'isClientSignatureEnabledAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#isClientSignatureEnabledAsync:member(1)' + package: outlook! + fullName: 'isClientSignatureEnabledAsync(options, callback)' + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, + or forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API call returns + `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. If + the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new + Outlook on Windows, the API call returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: isClientSignatureEnabledAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#isClientSignatureEnabledAsync:member(2)' + package: outlook! + fullName: isClientSignatureEnabledAsync(callback) + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, + or forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API call returns + `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. If + the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new + Outlook on Windows, the API call returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.LoadedMessageCompose#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'saveAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#saveAsync:member(1)' + package: outlook! + fullName: 'saveAsync(options, callback)' + summary: Asynchronously saves the current message as a draft. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the + REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced + to the server. Until the item is synced, using the item ID will return an error. + + + - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when + `saveAsync` is called on a message that will be sent from a shared mailbox account. If the sender creates a new + message from their personal mailbox and selects the shared mailbox account in the **From** field, `saveAsync` + saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the shared + mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and + creates a new message there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS message ID is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: saveAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#saveAsync:member(2)' + package: outlook! + fullName: saveAsync(callback) + summary: Asynchronously saves the current message as a draft. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the + REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced + to the server. Until the item is synced, using the item ID will return an error. + + + - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when + `saveAsync` is called on a message that will be sent from a shared mailbox account. If the sender creates a new + message from their personal mailbox and selects the shared mailbox account in the **From** field, `saveAsync` + saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the shared + mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and + creates a new message there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS message ID is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'unloadAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageCompose#unloadAsync:member(1)' + package: outlook! + fullName: 'unloadAsync(options, callback)' + summary: >- + When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be + loaded for processing. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - To learn more about processing multiple selected messages, see [Activate your Outlook add-in on multiple + messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + + + - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after + processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. + isPreview: false + isDeprecated: false + syntax: + content: >- + unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains the `asyncContext` property. Assign any object you wish to access in the + callback function to the `asyncContext` property. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: unloadAsync(callback) + uid: 'outlook!Office.LoadedMessageCompose#unloadAsync:member(2)' + package: outlook! + fullName: unloadAsync(callback) + summary: >- + When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be + loaded for processing. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - To learn more about processing multiple selected messages, see [Activate your Outlook add-in on multiple + messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + + + - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after + processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. + isPreview: false + isDeprecated: false + syntax: + content: 'unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessageread.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessageread.yml new file mode 100644 index 0000000000..1ed2ae114d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.loadedmessageread.yml @@ -0,0 +1,1700 @@ +### YamlMime:TSType +name: Office.LoadedMessageRead +uid: 'outlook!Office.LoadedMessageRead:interface' +package: outlook! +fullName: Office.LoadedMessageRead +summary: >- + Represents a message in read mode that's currently loaded. A `LoadedMessageRead` object is returned when + `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. +remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Message Read + + + **Important**: + + + - When implementing the [item multi-select + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select), determine if you can + already access the required properties of the selected item through the `Office.context.mailbox.getSelectedItemsAsync` + call. If you can, you don't need to call `loadItemByIdAsync`. + + + - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call + `unloadAsync` after processing the item. This must be done before calling `loadItemByIdAsync` on another item. + + + #### Examples + + + ```TypeScript + + // Gets the sender's email address of each selected message. + + async function getSenderEmailAddress(item) { + const itemId = item.itemId; + await new Promise((resolve) => { + Office.context.mailbox.loadItemByIdAsync(itemId, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + const loadedItem = result.value; + const sender = loadedItem.from.emailAddress; + console.log(sender); + + // Unload the current message before processing another selected message. + loadedItem.unloadAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + resolve(); + }); + }); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachments + uid: 'outlook!Office.LoadedMessageRead#attachments:member' + package: outlook! + fullName: attachments + summary: Gets the item's attachments as an array. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not + returned. For more information, see [Blocked attachments in + Outlook](https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519). + isPreview: false + isDeprecated: false + syntax: + content: 'attachments: AttachmentDetails[];' + return: + type: '[]' + - name: body + uid: 'outlook!Office.LoadedMessageRead#body:member' + package: outlook! + fullName: body + summary: Gets the item's body and its format. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.LoadedMessageRead#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods to manage the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: cc + uid: 'outlook!Office.LoadedMessageRead#cc:member' + package: outlook! + fullName: cc + summary: >- + Gets recipients on the **Cc** (carbon copy) line of a message. + + + The `cc` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each recipient listed on the + **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + + + - classic Windows: 500 recipients + + + - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'cc: EmailAddressDetails[];' + return: + type: '[]' + - name: conversationId + uid: 'outlook!Office.LoadedMessageRead#conversationId:member' + package: outlook! + fullName: conversationId + summary: >- + Gets an identifier for the email conversation that contains a particular message. + + + You can get an integer for this property if your mail app is activated in read forms or responses in compose + forms. If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation + ID for that message will change and that value you obtained earlier will no longer apply. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'conversationId: string;' + return: + type: string + - name: dateTimeCreated + uid: 'outlook!Office.LoadedMessageRead#dateTimeCreated:member' + package: outlook! + fullName: dateTimeCreated + summary: Gets the date and time that an item was created. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeCreated: Date;' + return: + type: Date + - name: dateTimeModified + uid: 'outlook!Office.LoadedMessageRead#dateTimeModified:member' + package: outlook! + fullName: dateTimeModified + summary: Gets the date and time that an item was last modified. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on + supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeModified: Date;' + return: + type: Date + - name: end + uid: 'outlook!Office.LoadedMessageRead#end:member' + package: outlook! + fullName: end + summary: >- + Gets the date and time that the appointment is to end. + + + The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You can + use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + + + When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to + convert the local time on the client to UTC for the server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'end: Date;' + return: + type: Date + - name: from + uid: 'outlook!Office.LoadedMessageRead#from:member' + package: outlook! + fullName: from + summary: |- + Gets the email address of the sender of a message. + + The `from` property returns an `EmailAddressDetails` object. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. In that + case, the `from` property represents the delegator, and the `sender` property represents the delegate. + + + - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. + isPreview: false + isDeprecated: false + syntax: + content: 'from: EmailAddressDetails;' + return: + type: '' + - name: internetMessageId + uid: 'outlook!Office.LoadedMessageRead#internetMessageId:member' + package: outlook! + fullName: internetMessageId + summary: Gets the internet message identifier of a message. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently + sent items. In that case, consider using [Exchange Web + Services](https://learn.microsoft.com/office/dev/add-ins/outlook/web-services) to get this [property from the + server](https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid). + isPreview: false + isDeprecated: false + syntax: + content: 'internetMessageId: string;' + return: + type: string + - name: itemClass + uid: 'outlook!Office.LoadedMessageRead#itemClass:member' + package: outlook! + fullName: itemClass + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + The following table lists the default item classes for messages. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ + + You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. + isPreview: false + isDeprecated: false + syntax: + content: 'itemClass: string;' + return: + type: string + - name: itemId + uid: 'outlook!Office.LoadedMessageRead#itemId:member' + package: outlook! + fullName: itemId + summary: >- + Gets the [Exchange Web Services item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + for the current item. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - The `itemId` property isn't available in compose mode. If an item identifier is required, the + `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the + item identifier in the `asyncResult.value` parameter in the callback function. If the item is already saved, you + can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + + + - The identifier returned by the `itemId` property is the same as the [Exchange Web Services item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The `itemId` property isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + isPreview: false + isDeprecated: false + syntax: + content: 'itemId: string;' + return: + type: string + - name: itemType + uid: 'outlook!Office.LoadedMessageRead#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: location + uid: 'outlook!Office.LoadedMessageRead#location:member' + package: outlook! + fullName: location + summary: |- + Gets the location of a meeting request. + + The `location` property returns a string that contains the location of the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'location: string;' + return: + type: string + - name: normalizedSubject + uid: 'outlook!Office.LoadedMessageRead#normalizedSubject:member' + package: outlook! + fullName: normalizedSubject + summary: >- + Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + + + The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) + that are added by email programs. To get the subject of the item with the prefixes intact, use the `subject` + property. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'normalizedSubject: string;' + return: + type: string + - name: notificationMessages + uid: 'outlook!Office.LoadedMessageRead#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages of the item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - Only the `getAllAsync` method of the NotificationMessages object is supported. + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: recurrence + uid: 'outlook!Office.LoadedMessageRead#recurrence:member' + package: outlook! + fullName: recurrence + summary: >- + Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose + modes for appointment items. Read mode for meeting request items. + + + The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item + is a series or an instance in a series. `null` is returned for single appointments and meeting requests of single + appointments. `undefined` is returned for messages that aren't meeting requests. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. + + + - If the `recurrence` object is null, this indicates that the object is a single appointment or a meeting request + of a single appointment and *not* a part of a series. + + + - Only the propeties and the `getAsync` method of the Recurrence object are supported. + isPreview: false + isDeprecated: false + syntax: + content: 'recurrence: Recurrence;' + return: + type: '' + - name: sender + uid: 'outlook!Office.LoadedMessageRead#sender:member' + package: outlook! + fullName: sender + summary: Gets the email address of the sender of an email message. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. In that + case, the `from` property represents the delegator, and the `sender` property represents the delegate. + + + - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. + isPreview: false + isDeprecated: false + syntax: + content: 'sender: EmailAddressDetails;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.LoadedMessageRead#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web and on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), the `seriesId` + returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. The + `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls + using this value, it should be converted using `Office.context.mailbox.convertToRestId`. For more details, + see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + - The `seriesId` property returns `null` for items that don't have parent items such as single appointments, + series items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: start + uid: 'outlook!Office.LoadedMessageRead#start:member' + package: outlook! + fullName: start + summary: >- + Gets the date and time that the appointment is to begin. + + + The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You + can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'start: Date;' + return: + type: Date + - name: subject + uid: 'outlook!Office.LoadedMessageRead#subject:member' + package: outlook! + fullName: subject + summary: >- + Gets the description that appears in the subject field of an item. + + + The `subject` property gets the entire subject of the item, as sent by the email server. + + + The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading + prefixes such as RE: and FW:. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'subject: string;' + return: + type: string + - name: to + uid: 'outlook!Office.LoadedMessageRead#to:member' + package: outlook! + fullName: to + summary: >- + Gets the recipients on the **To** line of a message. Provides access to the recipients on the **To** line + of a message. The type of object and level of access depend on the mode of the current item. + + + The `to` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each recipient listed on the + **To** line of the message. The maximum number of recipients returned varies per Outlook client. + + + - classic Windows: 500 recipients + + + - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'to: EmailAddressDetails[];' + return: + type: '[]' +methods: + - name: 'displayReplyAllFormAsync(formData, options, callback)' + uid: 'outlook!Office.LoadedMessageRead#displayReplyAllFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyAllFormAsync(formData, callback)' + uid: 'outlook!Office.LoadedMessageRead#displayReplyAllFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, options, callback)' + uid: 'outlook!Office.LoadedMessageRead#displayReplyFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, callback)' + uid: 'outlook!Office.LoadedMessageRead#displayReplyFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAllInternetHeadersAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageRead#getAllInternetHeadersAsync:member(1)' + package: outlook! + fullName: 'getAllInternetHeadersAsync(options, callback)' + summary: >- + Gets all the internet headers for the message as a string. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. On success, the internet headers + data is provided in the `asyncResult.value` property as a string. Refer to [RFC + 2183](https://tools.ietf.org/html/rfc2183) for the formatting information of the returned string value. If + the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAllInternetHeadersAsync(callback) + uid: 'outlook!Office.LoadedMessageRead#getAllInternetHeadersAsync:member(2)' + package: outlook! + fullName: getAllInternetHeadersAsync(callback) + summary: >- + Gets all the internet headers for the message as a string. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. On success, the internet headers + data is provided in the `asyncResult.value` property as a string. Refer to [RFC + 2183](https://tools.ietf.org/html/rfc2183) for the formatting information of the returned string value. If + the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAsFileAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageRead#getAsFileAsync:member(1)' + package: outlook! + fullName: 'getAsFileAsync(options, callback)' + summary: Gets the current message in EML format encoded in Base64. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter, + `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded EML format of the message + is returned in the `asyncResult.value` property. Any errors encountered are returned in the + `asyncResult.error` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAsFileAsync(callback) + uid: 'outlook!Office.LoadedMessageRead#getAsFileAsync:member(2)' + package: outlook! + fullName: getAsFileAsync(callback) + summary: Gets the current message in EML format encoded in Base64. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter, + `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded EML format of the message + is returned in the `asyncResult.value` property. Any errors encountered are returned in the + `asyncResult.error` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.LoadedMessageRead#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.MessageRead%23attachments:member) call, then in the same session, use that + identifier to retrieve the attachment. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.LoadedMessageRead#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.MessageRead%23attachments:member) call, then in the same session, use that + identifier to retrieve the attachment. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageRead#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.LoadedMessageRead#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getRegExMatches() + uid: 'outlook!Office.LoadedMessageRead#getRegExMatches:member(1)' + package: outlook! + fullName: getRegExMatches() + summary: Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + The name of each array is equal to the corresponding value of the RegExName attribute of the matching + `ItemHasRegularExpressionMatch` rule or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. + For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that + is specified by that rule. The `PropertyName` simple type defines the supported properties. + - name: getRegExMatchesByName(name) + uid: 'outlook!Office.LoadedMessageRead#getRegExMatchesByName:member(1)' + package: outlook! + fullName: getRegExMatchesByName(name) + summary: >- + Returns string values in the selected item that match the named regular expression defined in an XML manifest + file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatchesByName(name: string): string[];' + parameters: + - id: name + description: The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + type: string + return: + type: 'string[]' + description: >- + An array that contains the strings that match the regular expression defined in the + `ItemHasRegularExpressionMatch` rule element in the manifest XML file, with the specified `RegExName` element + value. + - name: getSelectedRegExMatches() + uid: 'outlook!Office.LoadedMessageRead#getSelectedRegExMatches:member(1)' + package: outlook! + fullName: getSelectedRegExMatches() + summary: >- + Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file. + Highlighted matches apply to contextual add-ins. + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as .* to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + isPreview: false + isDeprecated: false + syntax: + content: 'getSelectedRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching + `ItemHasRegularExpressionMatch` rule or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. + For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that + is specified by that rule. The `PropertyName` simple type defines the supported properties. + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageRead#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.LoadedMessageRead#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.LoadedMessageRead#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: Only the `get` and `getAll` methods of the CustomProperties object are supported. + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'unloadAsync(options, callback)' + uid: 'outlook!Office.LoadedMessageRead#unloadAsync:member(1)' + package: outlook! + fullName: 'unloadAsync(options, callback)' + summary: >- + When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be + loaded for processing. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - To learn more about processing multiple selected messages, see [Activate your Outlook add-in on multiple + messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + + + - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after + processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. + isPreview: false + isDeprecated: false + syntax: + content: >- + unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains the `asyncContext` property. Assign any object you wish to access in the + callback function to the `asyncContext` property. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: unloadAsync(callback) + uid: 'outlook!Office.LoadedMessageRead#unloadAsync:member(2)' + package: outlook! + fullName: unloadAsync(callback) + summary: >- + When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be + loaded for processing. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - To learn more about processing multiple selected messages, see [Activate your Outlook add-in on multiple + messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + + + - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after + processing on it. This must be done before calling `loadItemByIdAsync` on another selected item. + isPreview: false + isDeprecated: false + syntax: + content: 'unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.localclienttime.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.localclienttime.yml new file mode 100644 index 0000000000..adb0129a53 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.localclienttime.yml @@ -0,0 +1,115 @@ +### YamlMime:TSType +name: Office.LocalClientTime +uid: 'outlook!Office.LocalClientTime:interface' +package: outlook! +fullName: Office.LocalClientTime +summary: Represents a date and time in the local client's time zone. Read mode only. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read +isPreview: false +isDeprecated: false +type: interface +properties: + - name: date + uid: 'outlook!Office.LocalClientTime#date:member' + package: outlook! + fullName: date + summary: Integer value representing the day of the month. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'date: number;' + return: + type: number + - name: hours + uid: 'outlook!Office.LocalClientTime#hours:member' + package: outlook! + fullName: hours + summary: Integer value representing the hour on a 24-hour clock. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'hours: number;' + return: + type: number + - name: milliseconds + uid: 'outlook!Office.LocalClientTime#milliseconds:member' + package: outlook! + fullName: milliseconds + summary: Integer value representing the milliseconds. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'milliseconds: number;' + return: + type: number + - name: minutes + uid: 'outlook!Office.LocalClientTime#minutes:member' + package: outlook! + fullName: minutes + summary: Integer value representing the minutes. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'minutes: number;' + return: + type: number + - name: month + uid: 'outlook!Office.LocalClientTime#month:member' + package: outlook! + fullName: month + summary: 'Integer value representing the month, beginning with 0 for January to 11 for December.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'month: number;' + return: + type: number + - name: seconds + uid: 'outlook!Office.LocalClientTime#seconds:member' + package: outlook! + fullName: seconds + summary: Integer value representing the seconds. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'seconds: number;' + return: + type: number + - name: timezoneOffset + uid: 'outlook!Office.LocalClientTime#timezoneOffset:member' + package: outlook! + fullName: timezoneOffset + summary: Integer value representing the number of minutes difference between the local time zone and UTC. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'timezoneOffset: number;' + return: + type: number + - name: year + uid: 'outlook!Office.LocalClientTime#year:member' + package: outlook! + fullName: year + summary: Integer value representing the year. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'year: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.location.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.location.yml new file mode 100644 index 0000000000..a7e3d45806 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.location.yml @@ -0,0 +1,256 @@ +### YamlMime:TSType +name: Office.Location +uid: 'outlook!Office.Location:interface' +package: outlook! +fullName: Office.Location +summary: Provides methods to get and set the location of a meeting in an Outlook add-in. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Location#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the location of an appointment. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. + The location of the appointment is provided as a string in the `asyncResult.value` property. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + const userContext = { value : 1 }; + + Office.context.mailbox.item.location.getAsync( { context: userContext}, callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const location = asyncResult.value; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Location#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the location of an appointment. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. + The location of the appointment is provided as a string in the `asyncResult.value` property. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-location-appointment-organizer.yaml + + + Office.context.mailbox.item.location.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Appointment location: ${result.value}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'setAsync(location, options, callback)' + uid: 'outlook!Office.Location#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(location, options, callback)' + summary: >- + Sets the location of an appointment. + + + The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. + Setting the location of an appointment overwrites the current location. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-location-appointment-organizer.yaml + + + const location = "my office"; + + Office.context.mailbox.item.location.setAsync(location, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set location to ${location}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(location: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: location + description: The location of the appointment. The string is limited to 255 characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(location, callback)' + uid: 'outlook!Office.Location#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(location, callback)' + summary: >- + Sets the location of an appointment. + + + The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. + Setting the location of an appointment overwrites the current location. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(location: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: location + description: The location of the appointment. The string is limited to 255 characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationdetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationdetails.yml new file mode 100644 index 0000000000..755ba56cf5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationdetails.yml @@ -0,0 +1,79 @@ +### YamlMime:TSType +name: Office.LocationDetails +uid: 'outlook!Office.LocationDetails:interface' +package: outlook! +fullName: Office.LocationDetails +summary: Represents a location. Read-only. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.enhancedLocation.getAsync(callbackFunction); + + + function callbackFunction(asyncResult) { + asyncResult.value.forEach(function (place) { + console.log("Display name: " + place.displayName); + console.log("Type: " + place.locationIdentifier.type); + if (place.locationIdentifier.type === Office.MailboxEnums.LocationType.Room) { + console.log("Email address: " + place.emailAddress); + } + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: displayName + uid: 'outlook!Office.LocationDetails#displayName:member' + package: outlook! + fullName: displayName + summary: The location's display name. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'displayName: string;' + return: + type: string + - name: emailAddress + uid: 'outlook!Office.LocationDetails#emailAddress:member' + package: outlook! + fullName: emailAddress + summary: The email address associated with the location. Only locations of type `Room` have an email address. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'emailAddress: string;' + return: + type: string + - name: locationIdentifier + uid: 'outlook!Office.LocationDetails#locationIdentifier:member' + package: outlook! + fullName: locationIdentifier + summary: The `LocationIdentifier` of the location. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'locationIdentifier: LocationIdentifier;' + return: + type: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationidentifier.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationidentifier.yml new file mode 100644 index 0000000000..2fe03c240d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.locationidentifier.yml @@ -0,0 +1,66 @@ +### YamlMime:TSType +name: Office.LocationIdentifier +uid: 'outlook!Office.LocationIdentifier:interface' +package: outlook! +fullName: Office.LocationIdentifier +summary: Represents the ID of a location. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + const locations = [ + { + "id": "Contoso", + "type": Office.MailboxEnums.LocationType.Custom + } + ]; + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: id + uid: 'outlook!Office.LocationIdentifier#id:member' + package: outlook! + fullName: id + summary: |- + The location's unique ID. + + For `Room` type, it's the room's email address. + + For `Custom` type, it's the `displayName`. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string + - name: type + uid: 'outlook!Office.LocationIdentifier#type:member' + package: outlook! + fullName: type + summary: The location's type. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'type: MailboxEnums.LocationType | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailbox.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailbox.yml new file mode 100644 index 0000000000..2691aa1201 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailbox.yml @@ -0,0 +1,3007 @@ +### YamlMime:TSType +name: Office.Mailbox +uid: 'outlook!Office.Mailbox:interface' +package: outlook! +fullName: Office.Mailbox +summary: |- + Provides access to the Microsoft Outlook add-in object model. + + Key properties: + + - `diagnostics`: Provides diagnostic information to an Outlook add-in. + + - `item`: Provides methods and properties for accessing a message or appointment in an Outlook add-in. + + - `userProfile`: Provides information about the user in an Outlook add-in. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.ItemChanged, loadNewItem, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + // Handle error. + } + }); + }); + }); + + + function loadNewItem(eventArgs) { + const item = Office.context.mailbox.item; + + // Check that item isn't null. + if (item !== null) { + // Work with item. For example, define and call a function that + // loads the properties of the newly selected item. + loadProps(item); + } + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: diagnostics + uid: 'outlook!Office.Mailbox#diagnostics:member' + package: outlook! + fullName: diagnostics + summary: >- + Provides diagnostic information to an Outlook add-in. + + + Contains the following members. + + + - `hostName` (string): A string that represents the name of the Office application. It should be one of the + following values: `Outlook`, `newOutlookWindows`, `OutlookWebApp`, `OutlookIOS`, + or `OutlookAndroid`. **Note**: The "Outlook" value is returned for Outlook on Windows (classic) and on + Mac. + + + - `hostVersion` (string): A string that represents the version of either the Office application or the Exchange + Server (e.g., "15.0.468.0"). If the mail add-in is running in Outlook on Windows (classic), on Mac, or on mobile + devices, the `hostVersion` property returns the version of the Outlook client. In Outlook on the web and [new + Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + property returns the version of the Exchange Server. + + + - `OWAView` (`MailboxEnums.OWAView` or string): An enum (or string literal) that represents the current view of + Outlook on the web. If the application is not Outlook on the web, then accessing this property results in + undefined. Outlook on the web has three views (`OneColumn` - displayed when the screen is narrow, `TwoColumns` - + displayed when the screen is wider, and `ThreeColumns` - displayed when the screen is wide) that correspond to the + width of the screen and the window, and the number of columns that can be displayed. + + + More information is under [Office.Diagnostics](xref:outlook!Office.Diagnostics:interface). + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + Starting with Mailbox requirement set 1.5, you can also use the + [Office.context.diagnostics](https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member) + property to get similar information. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml + + + // This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the + console. + + const diagnostics = Office.context.mailbox.diagnostics; + + console.log(`Client application: ${diagnostics.hostName}`); + + console.log(`Client version: ${diagnostics.hostVersion}`); + + + switch (diagnostics.OWAView) { + case undefined: + console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use."); + break; + case Office.MailboxEnums.OWAView.OneColumnNarrow: + console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.OneColumn: + console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.TwoColumns: + console.log("Current view (Outlook on the web only): Viewed from a tablet"); + break; + case Office.MailboxEnums.OWAView.ThreeColumns: + console.log("Current view (Outlook on the web only): Viewed from a desktop computer"); + break; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'diagnostics: Diagnostics;' + return: + type: '' + - name: ewsUrl + uid: 'outlook!Office.Mailbox#ewsUrl:member' + package: outlook! + fullName: ewsUrl + summary: Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - Your app must have the **read item** permission specified in its manifest to call the `ewsUrl` member in + read mode. + + + - In compose mode, you must call the `saveAsync` method before you can use the `ewsUrl` member. Your app must have + **read/write item** permissions to call the `saveAsync` method. + + + - This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - The `ewsUrl` value can be used by a remote service to make EWS calls to the user's mailbox. For example, you can + create a remote service to [get attachments from the selected + item](https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/ids-and-urls.yaml + + + // Get the EWS URL and EWS item ID. + + console.log("EWS URL: " + Office.context.mailbox.ewsUrl); + + const ewsId = Office.context.mailbox.item.itemId; + + console.log("EWS item ID: " + Office.context.mailbox.item.itemId); + + + // Convert the EWS item ID to a REST-formatted ID. + + const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("REST item ID: " + restId); + + + // Convert the REST-formatted ID back to an EWS-formatted ID. + + const ewsId2 = Office.context.mailbox.convertToEwsId(restId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("EWS ID (from REST ID): " + ewsId2); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'ewsUrl: string;' + return: + type: string + - name: item + uid: 'outlook!Office.Mailbox#item:member' + package: outlook! + fullName: item + summary: >- + The mailbox item. Depending on the context in which the add-in opened, the item type may vary. If you want to see + IntelliSense for only a specific type or mode, cast this item to one of the following: + + + [MessageCompose](xref:outlook!Office.MessageCompose:interface), + [MessageRead](xref:outlook!Office.MessageRead:interface), + [AppointmentCompose](xref:outlook!Office.AppointmentCompose:interface), + [AppointmentRead](xref:outlook!Office.AppointmentRead:interface) + + + **Important**: + + + - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must + be turned on. For guidance on how to configure the Reading Pane, see [Use and configure the Reading Pane to + preview messages](https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0). + + + - `item` can be null if your add-in supports pinning the task pane. For details on how to handle, see [Implement a + pinnable task pane in + Outlook](https://learn.microsoft.com/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: >- + item?: Item & ItemCompose & ItemRead & Message & MessageCompose & MessageRead & Appointment & AppointmentCompose + & AppointmentRead; + return: + type: >- + & & & & & & & & + + - name: masterCategories + uid: 'outlook!Office.Mailbox#masterCategories:member' + package: outlook! + fullName: masterCategories + summary: Gets an object that provides methods to manage the categories master list associated with a mailbox. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[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/45-categories/work-with-master-categories.yaml + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Master categories:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories in the master list."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const masterCategoriesToAdd = [ + { + displayName: "TestCategory", + color: Office.MailboxEnums.CategoryColor.Preset0 + } + ]; + + + Office.context.mailbox.masterCategories.addAsync(masterCategoriesToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully added categories to master list"); + } else { + console.log("masterCategories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + + + ... + + + const masterCategoriesToRemove = ["TestCategory"]; + + + Office.context.mailbox.masterCategories.removeAsync(masterCategoriesToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully removed categories from master list"); + } else { + console.log("masterCategories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'masterCategories: MasterCategories;' + return: + type: '' + - name: restUrl + uid: 'outlook!Office.Mailbox#restUrl:member' + package: outlook! + fullName: restUrl + summary: Gets the URL of the REST endpoint for this email account. + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted + add-ins are able to use the REST service until extended support ends for Outlook 2019 on October 14, 2025. Traffic + from these add-ins is automatically identified for exemption. This exemption also applies to new add-ins developed + after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to + migrate your add-ins to use [Microsoft + Graph](https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph). For guidance, see + [Compare Microsoft Graph and Outlook REST API + endpoints](https://learn.microsoft.com/outlook/rest/compare-graph). + + + - Your add-in must have the **read item** permission specified in its manifest to call the `restUrl` member in + read mode. + + + - In compose mode you must call the `saveAsync` method before you can use the `restUrl` member. Your add-in must + have **read/write item** permissions to call the `saveAsync` method. However, in delegate or shared scenarios, + you should instead use the `targetRestUrl` property of the + [SharedProperties](https://learn.microsoft.com/javascript/api/outlook/office.sharedproperties#outlook-office-sharedproperties-targetresturl-member) + object (introduced in requirement set 1.8). For more information, see the [shared folders and shared + mailbox](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access) article. + + + #### Examples + + + ```TypeScript + + // Get the URL of the REST endpoint. + + const restUrl = Office.context.mailbox.restUrl; + + console.log(`REST API URL: ${restUrl}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'restUrl: string;' + return: + type: string + - name: userProfile + uid: 'outlook!Office.Mailbox#userProfile:member' + package: outlook! + fullName: userProfile + summary: >- + Information about the user associated with the mailbox. This includes their account type, display name, email + address, and time zone. + + + More information is under [Office.UserProfile](xref:outlook!Office.UserProfile:interface) + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'userProfile: UserProfile;' + return: + type: '' +methods: + - name: 'addHandlerAsync(eventType, handler, options, callback)' + uid: 'outlook!Office.Mailbox#addHandlerAsync:member(1)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, options, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Mailbox object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events). + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.ItemChanged, loadNewItem, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + // Handle error. + } + }); + }); + }); + + + function loadNewItem(eventArgs) { + const item = Office.context.mailbox.item; + + // Check that item isn't null. + if (item !== null) { + // Work with item. For example, define and call a function that + // loads the properties of the newly selected item. + loadProps(item); + } + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: options + description: 'Provides an option for preserving context data of any type, unchanged, for use in a callback.' + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, callback)' + uid: 'outlook!Office.Mailbox#addHandlerAsync:member(2)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Mailbox object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events). + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'convertToEwsId(id, restVersion)' + uid: 'outlook!Office.Mailbox#convertToEwsId:member(1)' + package: outlook! + fullName: 'convertToEwsId(id, restVersion)' + summary: Converts a supported ID into the Exchange Web Services (EWS) format. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - In February 2025, legacy Exchange [user + identity](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token) and + [callback](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens) tokens will be + turned off by default for all Exchange Online tenants. This is part of [Microsoft's Secure Future + Initiative](https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/), which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity + tokens will still work for Exchange on-premises. Nested app authentication (NAA) is the recommended approach for + tokens going forward. For more information, see the [FAQ page](https://aka.ms/naafaq). + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - Item IDs retrieved via a REST API (such as [Microsoft Graph](https://graph.microsoft.io/)) use a + different format than the format used by EWS. The `convertToEwsId` method converts a REST-formatted ID into the + proper format for EWS. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/ids-and-urls.yaml + + + // Get the EWS URL and EWS item ID. + + console.log("EWS URL: " + Office.context.mailbox.ewsUrl); + + const ewsId = Office.context.mailbox.item.itemId; + + console.log("EWS item ID: " + Office.context.mailbox.item.itemId); + + + // Convert the EWS item ID to a REST-formatted ID. + + const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("REST item ID: " + restId); + + + // Convert the REST-formatted ID back to an EWS-formatted ID. + + const ewsId2 = Office.context.mailbox.convertToEwsId(restId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("EWS ID (from REST ID): " + ewsId2); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'convertToEwsId(id: string, restVersion: MailboxEnums.RestVersion | string): string;' + parameters: + - id: id + description: >- + The ID to be converted into EWS format. This string can be an item ID formatted for the Outlook REST APIs or + a conversation ID retrieved from `Office.context.mailbox.item.conversationId`. + type: string + - id: restVersion + description: A value indicating the version of the Outlook REST API used to retrieve the item ID. + type: ' | string' + return: + type: string + description: '' + - name: convertToLocalClientTime(timeValue) + uid: 'outlook!Office.Mailbox#convertToLocalClientTime:member(1)' + package: outlook! + fullName: convertToLocalClientTime(timeValue) + summary: >- + Gets a dictionary containing time information in local client time. + + + The time zone used by the Outlook client varies by platform. Outlook on Windows (classic) and on Mac use the + client computer time zone. Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) use the time zone set on the + Exchange Admin Center (EAC). You should handle date and time values so that the values you display on the user + interface are always consistent with the time zone that the user expects. + + + In Outlook on Windows (classic) and on Mac, the `convertToLocalClientTime` method returns a dictionary object with + the values set to the client computer time zone. In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `convertToLocalClientTime` method returns a dictionary object with the values set to the time zone specified in + the EAC. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'convertToLocalClientTime(timeValue: Date): LocalClientTime;' + parameters: + - id: timeValue + description: A `Date` object. + type: Date + return: + type: '' + description: '' + - name: 'convertToRestId(id, restVersion)' + uid: 'outlook!Office.Mailbox#convertToRestId:member(1)' + package: outlook! + fullName: 'convertToRestId(id, restVersion)' + summary: Converts a supported ID into REST format. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - Item IDs retrieved via Exchange Web Services (EWS) or via the `itemId` property use a different format than the + format used by REST APIs (such as [Microsoft Graph](https://graph.microsoft.io/)). The `convertToRestId` + method converts an EWS-formatted ID into the proper format for REST. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/ids-and-urls.yaml + + + // Get the EWS URL and EWS item ID. + + console.log("EWS URL: " + Office.context.mailbox.ewsUrl); + + const ewsId = Office.context.mailbox.item.itemId; + + console.log("EWS item ID: " + Office.context.mailbox.item.itemId); + + + // Convert the EWS item ID to a REST-formatted ID. + + const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("REST item ID: " + restId); + + + // Convert the REST-formatted ID back to an EWS-formatted ID. + + const ewsId2 = Office.context.mailbox.convertToEwsId(restId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("EWS ID (from REST ID): " + ewsId2); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'convertToRestId(id: string, restVersion: MailboxEnums.RestVersion | string): string;' + parameters: + - id: id + description: >- + The ID to be converted into REST format. This string can be an item ID formatted for EWS that's usually + retrieved from `Office.context.mailbox.item.itemId`, a conversation ID retrieved from + `Office.context.mailbox.item.conversationId`, or a series ID retrieved from + `Office.context.mailbox.item.seriesId`. + type: string + - id: restVersion + description: A value indicating the version of the Outlook REST API used with the converted ID. + type: ' | string' + return: + type: string + description: '' + - name: convertToUtcClientTime(input) + uid: 'outlook!Office.Mailbox#convertToUtcClientTime:member(1)' + package: outlook! + fullName: convertToUtcClientTime(input) + summary: >- + Gets a `Date` object from a dictionary containing time information. + + + The `convertToUtcClientTime` method converts a dictionary containing a local date and time to a `Date` object with + the correct values for the local date and time. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // Represents 3:37 PM PDT on Monday, August 26, 2019. + + const input = { + date: 26, + hours: 15, + milliseconds: 2, + minutes: 37, + month: 7, + seconds: 2, + timezoneOffset: -420, + year: 2019 + }; + + + // result should be a Date object. + + const result = Office.context.mailbox.convertToUtcClientTime(input); + + + // Output should be "2019-08-26T22:37:02.002Z". + + console.log(result.toISOString()); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'convertToUtcClientTime(input: LocalClientTime): Date;' + parameters: + - id: input + description: The local time value to convert. + type: '' + return: + type: Date + description: A Date object with the time expressed in UTC. + - name: displayAppointmentForm(itemId) + uid: 'outlook!Office.Mailbox#displayAppointmentForm:member(1)' + package: outlook! + fullName: displayAppointmentForm(itemId) + summary: >- + Displays an existing calendar appointment. + + + The `displayAppointmentForm` method opens an existing calendar appointment in a new window on the desktop. + + + In Outlook on Mac, you can use this method to display a single appointment that isn't part of a recurring series, + or the master appointment of a recurring series. However, you can't display an instance of the series because you + can't access the properties (including the item ID) of instances of a recurring series. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier does not identify an existing appointment, a blank pane opens on the client + computer or device, and no error message is returned. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported + APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-existing-appointment.yaml + + + const itemId = $("#itemId").val(); + + Office.context.mailbox.displayAppointmentForm(itemId); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayAppointmentForm(itemId: string): void;' + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing calendar appointment. + type: string + return: + type: void + description: '' + - name: 'displayAppointmentFormAsync(itemId, options, callback)' + uid: 'outlook!Office.Mailbox#displayAppointmentFormAsync:member(1)' + package: outlook! + fullName: 'displayAppointmentFormAsync(itemId, options, callback)' + summary: >- + Displays an existing calendar appointment. + + + The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or + in a dialog box on mobile devices. + + + In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, + or the master appointment of a recurring series. However, you can't display an instance of the series because you + can't access the properties (including the item ID) of instances of a recurring series. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier does not identify an existing appointment, a blank pane opens on the client + computer or device, and no error message is returned. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/55-display-items/display-existing-appointment.yaml + + + const itemId = $("#itemId").val(); + + + // The async version will return error 9049 if the item is not found. + + // The async version is only available starting with requirement set 1.9. + + Office.context.mailbox.displayAppointmentFormAsync(itemId, function(asyncResult) { + console.log("Result: " + JSON.stringify(asyncResult)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayAppointmentFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing calendar appointment. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayAppointmentFormAsync(itemId, callback)' + uid: 'outlook!Office.Mailbox#displayAppointmentFormAsync:member(2)' + package: outlook! + fullName: 'displayAppointmentFormAsync(itemId, callback)' + summary: >- + Displays an existing calendar appointment. + + + The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or + in a dialog box on mobile devices. + + + In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, + or the master appointment of a recurring series. However, you can't display an instance of the series because you + can't access the properties (including the item ID) of instances of a recurring series. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier does not identify an existing appointment, a blank pane opens on the client + computer or device, and no error message is returned. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + displayAppointmentFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): + void; + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing calendar appointment. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayMessageForm(itemId) + uid: 'outlook!Office.Mailbox#displayMessageForm:member(1)' + package: outlook! + fullName: displayMessageForm(itemId) + summary: >- + Displays an existing message. + + + The `displayMessageForm` method opens an existing message in a new window on the desktop. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier doesn't identify an existing message, no message will be displayed on the client + computer, and no error message is returned. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - Don't use the `displayMessageForm` with an itemId that represents an appointment. Use the + `displayAppointmentForm` method to display an existing appointment, and `displayNewAppointmentForm` to display a + form to create a new appointment. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-existing-message.yaml + + + const itemId = $("#itemId").val(); + + Office.context.mailbox.displayMessageForm(itemId); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayMessageForm(itemId: string): void;' + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing message. + type: string + return: + type: void + description: '' + - name: 'displayMessageFormAsync(itemId, options, callback)' + uid: 'outlook!Office.Mailbox#displayMessageFormAsync:member(1)' + package: outlook! + fullName: 'displayMessageFormAsync(itemId, options, callback)' + summary: >- + Displays an existing message. + + + The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box + on mobile devices. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier does not identify an existing message, no message will be displayed on the client + computer, and no error message is returned. + + + Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an + appointment. Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing + appointment, and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new + appointment. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/55-display-items/display-existing-message.yaml + + + const itemId = $("#itemId").val(); + + + // The async version will return error 9049 if the item is not found. + + // The async version is only available starting with requirement set 1.9. + + Office.context.mailbox.displayMessageFormAsync(itemId, function (asyncResult) { + console.log("Result: " + JSON.stringify(asyncResult)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayMessageFormAsync(itemId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing message. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayMessageFormAsync(itemId, callback)' + uid: 'outlook!Office.Mailbox#displayMessageFormAsync:member(2)' + package: outlook! + fullName: 'displayMessageFormAsync(itemId, callback)' + summary: >- + Displays an existing message. + + + The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box + on mobile devices. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method opens the + specified form only if the body of the form is less than or equal to 32K characters. + + + If the specified item identifier does not identify an existing message, no message will be displayed on the client + computer, and no error message is returned. + + + Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an + appointment. Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing + appointment, and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new + appointment. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'displayMessageFormAsync(itemId: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: itemId + description: The Exchange Web Services (EWS) identifier for an existing message. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayNewAppointmentForm(parameters) + uid: 'outlook!Office.Mailbox#displayNewAppointmentForm:member(1)' + package: outlook! + fullName: displayNewAppointmentForm(parameters) + summary: >- + Displays a form for creating a new calendar appointment. + + + The `displayNewAppointmentForm` method opens a form that enables the user to create a new appointment or meeting. + If parameters are specified, the appointment form fields are automatically populated with the contents of the + parameters. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method always + displays a form with an attendees field. If you don't specify any attendees as input arguments, the method + displays a form with a **Save** button. If you have specified attendees, the form would include the attendees + and a **Send** button. + + + In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the + `requiredAttendees`, `optionalAttendees`, or `resources` parameter, this method displays a meeting + form with a **Send** button. If you don't specify any recipients, this method displays an appointment form + with a **Save & Close** button. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + + + **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported + APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-new-appointment.yaml + + + const start = new Date(); + + const end = new Date(); + + end.setHours(start.getHours() + 1); + + + Office.context.mailbox.displayNewAppointmentForm({ + requiredAttendees: ["bob@contoso.com"], + optionalAttendees: ["sam@contoso.com"], + start: start, + end: end, + location: "Home", + subject: "meeting", + resources: ["projector@contoso.com"], + body: "Hello World!" + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayNewAppointmentForm(parameters: AppointmentForm): void;' + parameters: + - id: parameters + description: An `AppointmentForm` describing the new appointment. All properties are optional. + type: '' + return: + type: void + description: '' + - name: 'displayNewAppointmentFormAsync(parameters, options, callback)' + uid: 'outlook!Office.Mailbox#displayNewAppointmentFormAsync:member(1)' + package: outlook! + fullName: 'displayNewAppointmentFormAsync(parameters, options, callback)' + summary: >- + Displays a form for creating a new calendar appointment. + + + The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or + meeting. If parameters are specified, the appointment form fields are automatically populated with the contents of + the parameters. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method always + displays a form with an attendees field. If you do not specify any attendees as input arguments, the method + displays a form with a **Save** button. If you have specified attendees, the form would include the attendees + and a **Send** button. + + + In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the + `requiredAttendees`, `optionalAttendees`, or `resources` parameter, this method displays a meeting + form with a **Send** button. If you don't specify any recipients, this method displays an appointment form + with a **Save & Close** button. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-new-appointment.yaml + + + const start = new Date(); + + const end = new Date(); + + end.setHours(start.getHours() + 1); + + + // The async version is only available starting with requirement set 1.9, + + // and provides a callback when the new appointment form has been created. + + Office.context.mailbox.displayNewAppointmentFormAsync( + { + requiredAttendees: ["bob@contoso.com"], + optionalAttendees: ["sam@contoso.com"], + start: start, + end: end, + location: "Home", + subject: "meeting", + resources: ["projector@contoso.com"], + body: "Hello World!" + }, + function(asyncResult) { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayNewAppointmentFormAsync(parameters: AppointmentForm, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: parameters + description: An `AppointmentForm` describing the new appointment. All properties are optional. + type: '' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayNewAppointmentFormAsync(parameters, callback)' + uid: 'outlook!Office.Mailbox#displayNewAppointmentFormAsync:member(2)' + package: outlook! + fullName: 'displayNewAppointmentFormAsync(parameters, callback)' + summary: >- + Displays a form for creating a new calendar appointment. + + + The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or + meeting. If parameters are specified, the appointment form fields are automatically populated with the contents of + the parameters. + + + In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), this method always + displays a form with an attendees field. If you do not specify any attendees as input arguments, the method + displays a form with a **Save** button. If you have specified attendees, the form would include the attendees + and a **Send** button. + + + In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the + `requiredAttendees`, `optionalAttendees`, or `resources` parameter, this method displays a meeting + form with a **Send** button. If you don't specify any recipients, this method displays an appointment form + with a **Save & Close** button. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + isPreview: false + isDeprecated: false + syntax: + content: >- + displayNewAppointmentFormAsync(parameters: AppointmentForm, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: parameters + description: An `AppointmentForm` describing the new appointment. All properties are optional. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayNewMessageForm(parameters) + uid: 'outlook!Office.Mailbox#displayNewMessageForm:member(1)' + package: outlook! + fullName: displayNewMessageForm(parameters) + summary: >- + Displays a form for creating a new message. + + + The `displayNewMessageForm` method opens a form that enables the user to create a new message. If parameters are + specified, the message form fields are automatically populated with the contents of the parameters. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-new-message.yaml + + + Office.context.mailbox.displayNewMessageForm({ + toRecipients: Office.context.mailbox.item.to, // Copies the To line from current item + ccRecipients: ["sam@contoso.com"], + subject: "Outlook add-ins are cool!", + htmlBody: 'Hello World!
', + attachments: [ + { + type: "file", + name: "image.png", + url: "https://i.imgur.com/9S36xvA.jpg", + isInline: true + } + ] + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayNewMessageForm(parameters: any): void;' + parameters: + - id: parameters + description: >- + A dictionary containing all values to be filled in for the user in the new form. All parameters are + optional. + + + `toRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **To** line. The array is limited to a maximum of 100 entries. + + + `ccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Cc** line. The array is limited to a maximum of 100 entries. + + + `bccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Bcc** line. The array is limited to a maximum of 100 entries. + + + `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 + characters. + + + `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + + + `attachments`: An array of JSON objects that are either file or item attachments. + + + `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` + for an item attachment. + + + `attachments.name`: A string that contains the name of the attachment, up to 255 characters in + length. + + + `attachments.url`: Only used if the attachment type is set to `file`. The URI of the + location for the file. **Important**: This link must be publicly accessible, without need for + authentication by Exchange Online servers. However, with on-premises Exchange, the link can be accessible on + a private network as long as it doesn't need further authentication. + + + `attachments.isInline`: Only used if the attachment type is set to `file`. If true, + indicates that the attachment will be shown inline as an image in the message body and won't be displayed in + the attachment list. + + + `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of + the existing e-mail you want to attach to the new message. This is a string up to 100 characters. + type: any + return: + type: void + description: '' + - name: 'displayNewMessageFormAsync(parameters, options, callback)' + uid: 'outlook!Office.Mailbox#displayNewMessageFormAsync:member(1)' + package: outlook! + fullName: 'displayNewMessageFormAsync(parameters, options, callback)' + summary: >- + Displays a form for creating a new message. + + + The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. If parameters + are specified, the message form fields are automatically populated with the contents of the parameters. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-new-message.yaml + + + // The async version is only available starting with requirement set 1.9, + + // and provides a callback when the new message form has been created. + + Office.context.mailbox.displayNewMessageFormAsync( + { + toRecipients: Office.context.mailbox.item.to, // Copies the To line from current item + ccRecipients: ["sam@contoso.com"], + subject: "Outlook add-ins are cool!", + htmlBody: 'Hello World!
', + attachments: [ + { + type: "file", + name: "image.png", + url: "https://i.imgur.com/9S36xvA.jpg", + isInline: true + } + ] + }, + (asyncResult) => { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayNewMessageFormAsync(parameters: any, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: parameters + description: >- + A dictionary containing all values to be filled in for the user in the new form. All parameters are + optional. + + + `toRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **To** line. The array is limited to a maximum of 100 entries. + + + `ccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Cc** line. The array is limited to a maximum of 100 entries. + + + `bccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Bcc** line. The array is limited to a maximum of 100 entries. + + + `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 + characters. + + + `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + + + `attachments`: An array of JSON objects that are either file or item attachments. + + + `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` + for an item attachment. + + + `attachments.name`: A string that contains the name of the attachment, up to 255 characters in + length. + + + `attachments.url`: Only used if the attachment type is set to `file`. The URI of the + location for the file. **Important**: This link must be publicly accessible, without need for + authentication by Exchange Online servers. However, with on-premises Exchange, the link can be accessible on + a private network as long as it doesn't need further authentication. + + + `attachments.isInline`: Only used if the attachment type is set to `file`. If true, + indicates that the attachment will be shown inline as an image in the message body and won't be displayed in + the attachment list. + + + `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of + the existing e-mail you want to attach to the new message. This is a string up to 100 characters. + type: any + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayNewMessageFormAsync(parameters, callback)' + uid: 'outlook!Office.Mailbox#displayNewMessageFormAsync:member(2)' + package: outlook! + fullName: 'displayNewMessageFormAsync(parameters, callback)' + summary: >- + Displays a form for creating a new message. + + + The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. If parameters + are specified, the message form fields are automatically populated with the contents of the parameters. + + + If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an + exception is thrown. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Read + isPreview: false + isDeprecated: false + syntax: + content: >- + displayNewMessageFormAsync(parameters: any, callback?: (asyncResult: Office.AsyncResult) => void): + void; + parameters: + - id: parameters + description: >- + A dictionary containing all values to be filled in for the user in the new form. All parameters are + optional. + + + `toRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **To** line. The array is limited to a maximum of 100 entries. + + + `ccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Cc** line. The array is limited to a maximum of 100 entries. + + + `bccRecipients`: An array of strings containing the email addresses or an array containing an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each of the recipients + on the **Bcc** line. The array is limited to a maximum of 100 entries. + + + `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 + characters. + + + `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + + + `attachments`: An array of JSON objects that are either file or item attachments. + + + `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` + for an item attachment. + + + `attachments.name`: A string that contains the name of the attachment, up to 255 characters in + length. + + + `attachments.url`: Only used if the attachment type is set to `file`. The URI of the + location for the file. **Important**: This link must be publicly accessible, without need for + authentication by Exchange Online servers. However, with on-premises Exchange, the link can be accessible on + a private network as long as it doesn't need further authentication. + + + `attachments.isInline`: Only used if the attachment type is set to `file`. If true, + indicates that the attachment will be shown inline as an image in the message body and won't be displayed in + the attachment list. + + + `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of + the existing e-mail you want to attach to the new message. This is a string up to 100 characters. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getCallbackTokenAsync(options, callback)' + uid: 'outlook!Office.Mailbox#getCallbackTokenAsync:member(1)' + package: outlook! + fullName: 'getCallbackTokenAsync(options, callback)' + summary: >- + Gets a string that contains a token used to call REST APIs or Exchange Web Services (EWS). + + + The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that + hosts the user's mailbox. The lifetime of the callback token is 5 minutes. + + + The token is returned as a string in the `asyncResult.value` property. + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - In February 2025, legacy Exchange [user + identity](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token) and + [callback](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens) tokens will be + turned off by default for all Exchange Online tenants. This is part of [Microsoft's Secure Future + Initiative](https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/), which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity + tokens will still work for Exchange on-premises. Nested app authentication (NAA) is the recommended approach for + tokens going forward. For more information, see the [FAQ page](https://aka.ms/naafaq). + + + - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted + add-ins are able to use the REST service until extended support ends for Outlook 2019 on October 14, 2025. Traffic + from these add-ins is automatically identified for exemption. This exemption also applies to new add-ins developed + after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to + migrate your add-ins to use [Microsoft + Graph](https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph). For guidance, see + [Compare Microsoft Graph and Outlook REST API + endpoints](https://learn.microsoft.com/outlook/rest/compare-graph). + + + - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + + + - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported + APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - EWS operations aren't supported in add-ins running in Outlook on iOS and on Android. A REST token is always + returned in Outlook mobile clients even if `options.isRest` is set to `false`. + + + - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read + item**. + + + - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. The `saveAsync` + method requires a minimum permission level of **read/write item**. + + + - For guidance on delegate or shared scenarios, see the [shared folders and shared + mailbox](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access) article. + + + *REST Tokens* + + + When a REST token is requested (`options.isRest` = `true`), the resulting token won't work to authenticate + EWS calls. The token will be limited in scope to read-only access to the current item and its attachments, unless + the add-in has specified the **read/write mailbox** permission in its manifest. If the **read/write + mailbox** permission is specified, the resulting token will grant read/write access to mail, calendar, and + contacts, including the ability to send mail. + + + The add-in should use the `restUrl` property to determine the correct URL to use when making REST API calls. + + + This API works for the following scopes. + + + - `Mail.ReadWrite` + + + - `Mail.Send` + + + - `Calendars.ReadWrite` + + + - `Contacts.ReadWrite` + + + *EWS Tokens* + + + When an EWS token is requested (`options.isRest` = `false`), the resulting token won't work to + authenticate REST API calls. The token will be limited in scope to accessing the current item. + + + The add-in should use the `ewsUrl` property to determine the correct URL to use when making EWS calls. + + + You can pass both the token and either an attachment identifier or item identifier to an external system. That + system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) + [GetAttachment](https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation) + operation or + [GetItem](https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation) operation + to return an attachment or item. For example, you can create a remote service to [get attachments from the + selected item](https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item). + + + **Errors**: + + + If your call fails, use the + [asyncResult.diagnostics](https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member) + property to view details about the error. + + + - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when + the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using + NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the [FAQ + page](https://aka.ms/naafaq). + + + - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + + + - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more + information.` - In Exchange Online environments, this error occurs when the token can't be retrieved because + legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for + your add-in. For guidance on how to implement NAA, see the [FAQ page](https://aka.ms/naafaq). + + + - `NetworkError: The user is no longer connected to the network. Please check your network connection and try + again.` + isPreview: false + isDeprecated: false + syntax: + content: >- + getCallbackTokenAsync(options: Office.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `isRest`: Determines if + the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is + `false`. `asyncContext`: Any state data that is passed to the asynchronous method. + type: ' & { isRest?: boolean }' + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter + of type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. + If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide + additional information. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getCallbackTokenAsync(callback, userContext)' + uid: 'outlook!Office.Mailbox#getCallbackTokenAsync:member(2)' + package: outlook! + fullName: 'getCallbackTokenAsync(callback, userContext)' + summary: >- + Gets a string that contains a token used to get an attachment or item from an Exchange Server. + + + The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that + hosts the user's mailbox. The lifetime of the callback token is 5 minutes. + + + The token is returned as a string in the `asyncResult.value` property. + remarks: >- + \[ [API set: All support Read mode; Mailbox 1.3 introduced Compose mode + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - In February 2025, legacy Exchange [user + identity](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token) and + [callback](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens) tokens will be + turned off by default for all Exchange Online tenants. This is part of [Microsoft's Secure Future + Initiative](https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/), which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity + tokens will still work for Exchange on-premises. Nested app authentication (NAA) is the recommended approach for + tokens going forward. For more information, see the [FAQ page](https://aka.ms/naafaq). + + + - You can pass both the token and either an attachment identifier or item identifier to an external system. That + system uses the token as a bearer authorization token to call the Exchange Web Services (EWS) + [GetAttachment](https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation) + or [GetItem](https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation) + operation to return an attachment or item. For example, you can create a remote service to [get attachments from + the selected item](https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item). + + + - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read + item**. + + + - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. The `saveAsync` + method requires a minimum permission level of **read/write item**. + + + - This method isn't supported in Outlook on Android or on iOS. EWS operations aren't supported in add-ins running + in Outlook on mobile clients. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript + APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + + + - For guidance on delegate or shared scenarios, see the [shared folders and shared + mailbox](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access) article. + + + **Errors**: + + + If your call fails, use the + [asyncResult.diagnostics](https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member) + property to view details about the error. + + + - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when + the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using + NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the [FAQ + page](https://aka.ms/naafaq). + + + - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + + + - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more + information.` - In Exchange Online environments, this error occurs when the token can't be retrieved because + legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for + your add-in. For guidance on how to implement NAA, see the [FAQ page](https://aka.ms/naafaq). + + + - `NetworkError: The user is no longer connected to the network. Please check your network connection and try + again.` + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/user-callback-token.yaml + + + Office.context.mailbox.getCallbackTokenAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Token retrieval failed with message: ${result.error.message}`); + return; + } + + console.log(result.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getCallbackTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter + of type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. + If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide + additional information. + type: '(asyncResult: <string>) => void' + - id: userContext + description: Optional. Any state data that is passed to the asynchronous method. + type: any + return: + type: void + description: '' + - name: getIsIdentityManaged() + uid: 'outlook!Office.Mailbox#getIsIdentityManaged:member(1)' + package: outlook! + fullName: getIsIdentityManaged() + summary: >- + Returns true if the current mailbox is managed by [Microsoft + Intune](https://learn.microsoft.com/mem/intune/fundamentals/what-is-intune). + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0.To + learn more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on + mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Errors**: + + + - `MAMServiceNotAvailable`: The client is unable to fetch the mobile application management (MAM) policy. + + + #### Examples + + + ```TypeScript + + // Checks if the mailbox is managed by Microsoft Intune. + + const isIdentityManaged = Office.context.mailbox.getIsIdentityManaged(); + + console.log(`Intune-managed mailbox: ${isIdentityManaged}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getIsIdentityManaged(): boolean;' + return: + type: boolean + description: True if the current mailbox is managed by Microsoft Intune. + - name: getIsOpenFromLocationAllowed(openLocation) + uid: 'outlook!Office.Mailbox#getIsOpenFromLocationAllowed:member(1)' + package: outlook! + fullName: getIsOpenFromLocationAllowed(openLocation) + summary: >- + Returns true if an organization's [Intune mobile application management (MAM) + policy](https://learn.microsoft.com/mem/intune/apps/app-management) allows an add-in to access data from the + specified location. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To + learn more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on + mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Errors**: + + + - `InvalidOpenLocationInput`: The value of the specified location is invalid. + + + - `MAMServiceNotAvailable`: The client is unable to fetch the MAM policy. + + + #### Examples + + + ```TypeScript + + // Checks if the add-in can access data from the device's photo library. + + const isOpenFromPhotoLibraryAllowed = + Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary); + + if (isOpenFromPhotoLibraryAllowed) { + console.log("Access to the photo library is allowed."); + // Do something. + } else { + console.log("Access to the photo library isn't allowed."); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getIsOpenFromLocationAllowed(openLocation: MailboxEnums.OpenLocation): boolean;' + parameters: + - id: openLocation + description: The location from which the add-in is attempting to access data. + type: '' + return: + type: boolean + description: True if an organization's Intune MAM policy allows an add-in to access data from the specified location. + - name: getIsSaveToLocationAllowed(saveLocation) + uid: 'outlook!Office.Mailbox#getIsSaveToLocationAllowed:member(1)' + package: outlook! + fullName: getIsSaveToLocationAllowed(saveLocation) + summary: >- + Returns true if an organization's [Intune mobile application management (MAM) + policy](https://learn.microsoft.com/mem/intune/apps/app-management) allows an add-in to save data to the specified + location. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To + learn more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on + mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Errors**: + + + - `InvalidSaveLocationInput`: The value of the specified location is invalid. + + + - `MAMServiceNotAvailable`: The client is unable to fetch the MAM policy. + + + #### Examples + + + ```TypeScript + + // Checks if the add-in can save data to SharePoint. + + const isSaveToSharePointAllowed = + Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint); + + if (isSaveToSharePointAllowed) { + console.log("Saving to SharePoint is allowed."); + // Do something. + } else { + console.log("Saving to SharePoint isn't allowed."); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getIsSaveToLocationAllowed(saveLocation: MailboxEnums.SaveLocation): boolean;' + parameters: + - id: saveLocation + description: The location in which the add-in is attempting to save data. + type: '' + return: + type: boolean + description: True if an organization's Intune MAM policy allows an add-in to save data to the specified location. + - name: 'getSelectedItemsAsync(options, callback)' + uid: 'outlook!Office.Mailbox#getSelectedItemsAsync:member(1)' + package: outlook! + fullName: 'getSelectedItemsAsync(options, callback)' + summary: >- + Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on + a maximum of 100 messages at a time. To learn more about item multi-select, see [Activate your Outlook add-in on + multiple messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: This method only applies to messages. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected + messages, such as the item ID and subject, are returned as an array of + [SelectedItemDetails](xref:outlook!Office.SelectedItemDetails:interface) objects in the `asyncResult.value` + property. The objects in the array follow the order in which messages were selected. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getSelectedItemsAsync(callback) + uid: 'outlook!Office.Mailbox#getSelectedItemsAsync:member(2)' + package: outlook! + fullName: getSelectedItemsAsync(callback) + summary: >- + Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on + a maximum of 100 messages at a time. To learn more about item multi-select, see [Activate your Outlook add-in on + multiple messages](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select). + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: This method only applies to messages. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-message-properties.yaml + + + // Retrieves the selected messages' properties and logs them to the console. + + Office.context.mailbox.getSelectedItemsAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + asyncResult.value.forEach((message) => { + console.log(`Item ID: ${message.itemId}`); + console.log(`Conversation ID: ${message.conversationId}`); + console.log(`Internet message ID: ${message.internetMessageId}`); + console.log(`Subject: ${message.subject}`); + console.log(`Item type: ${message.itemType}`); + console.log(`Item mode: ${message.itemMode}`); + console.log(`Has attachment: ${message.hasAttachment}`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected + messages, such as the item ID and subject, are returned as an array of + [SelectedItemDetails](xref:outlook!Office.SelectedItemDetails:interface) objects in the `asyncResult.value` + property. The objects in the array follow the order in which messages were selected. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'getUserIdentityTokenAsync(callback, userContext)' + uid: 'outlook!Office.Mailbox#getUserIdentityTokenAsync:member(1)' + package: outlook! + fullName: 'getUserIdentityTokenAsync(callback, userContext)' + summary: |- + Gets a token identifying the user and the Office Add-in. + + The token is returned as a string in the `asyncResult.value` property. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - In February 2025, legacy Exchange [user + identity](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token) and + [callback](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens) tokens will be + turned off by default for all Exchange Online tenants. This is part of [Microsoft's Secure Future + Initiative](https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/), which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity + tokens will still work for Exchange on-premises. Nested app authentication (NAA) is the recommended approach for + tokens going forward. For more information, see the [FAQ page](https://aka.ms/naafaq). + + + - The `getUserIdentityTokenAsync` method returns a token that you can use to identify and [authenticate the add-in + and user with an external system](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication). + + + - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + + + **Errors**: + + + If your call fails, use the + [asyncResult.diagnostics](https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member) + property to view details about the error. + + + - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when + the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using + NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the [FAQ + page](https://aka.ms/naafaq). + + + - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + + + - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more + information.` - In Exchange Online environments, this error occurs when the token can't be retrieved because + legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for + your add-in. For guidance on how to implement NAA, see the [FAQ page](https://aka.ms/naafaq). + + + - `NetworkError: The user is no longer connected to the network. Please check your network connection and try + again.` + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/user-identity-token.yaml + + + Office.context.mailbox.getUserIdentityTokenAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Token retrieval failed with message: ${result.error.message}`) + return; + } + + console.log(result.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): + void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter + of type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. + If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide + additional information. + type: '(asyncResult: <string>) => void' + - id: userContext + description: Optional. Any state data that is passed to the asynchronous method. + type: any + return: + type: void + description: '' + - name: 'loadItemByIdAsync(itemId, options, callback)' + uid: 'outlook!Office.Mailbox#loadItemByIdAsync:member(1)' + package: outlook! + fullName: 'loadItemByIdAsync(itemId, options, callback)' + summary: >- + Loads a single mail item by its Exchange Web Services (EWS) ID. Then, gets an object that provides the properties + and methods of the loaded item. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: + + + - This method only applies to messages. + + + - When implementing the [item multi-select + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select), call + `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be + loaded one at a time. + + + - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can + already access the required properties of the selected item using the + `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + + + - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call + `unloadAsync` after processing the item. This must be done before calling `loadItemByIdAsync` on another item. + + + - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + isPreview: false + isDeprecated: false + syntax: + content: >- + loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The EWS ID of a selected item. + type: string + - id: options + description: >- + An object literal that contains the `asyncContext` property. In this property, provide any object you wish + to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or + `LoadedMessageRead` object is returned in the `asyncResult.value` property. This object provides the + properties of the selected item that's currently loaded. + type: >- + (asyncResult: < | >) => void + return: + type: void + description: '' + - name: 'loadItemByIdAsync(itemId, callback)' + uid: 'outlook!Office.Mailbox#loadItemByIdAsync:member(2)' + package: outlook! + fullName: 'loadItemByIdAsync(itemId, callback)' + summary: >- + Loads a single mail item by its Exchange Web Services (EWS) ID. Then, gets an object that provides the properties + and methods of the loaded item. + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose, Read + + + **Important**: + + + - This method only applies to messages. + + + - When implementing the [item multi-select + feature](https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select), call + `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be + loaded one at a time. + + + - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can + already access the required properties of the selected item using the + `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + + + - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call + `unloadAsync` after processing the item. This must be done before calling `loadItemByIdAsync` on another item. + + + - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + isPreview: false + isDeprecated: false + syntax: + content: >- + loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The EWS ID of a selected item. + type: string + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or + `LoadedMessageRead` object is returned in the `asyncResult.value` property. This object provides the + properties of the selected item that's currently loaded. + type: >- + (asyncResult: < | >) => void + return: + type: void + description: '' + - name: 'makeEwsRequestAsync(data, callback, userContext)' + uid: 'outlook!Office.Mailbox#makeEwsRequestAsync:member(1)' + package: outlook! + fullName: 'makeEwsRequestAsync(data, callback, userContext)' + summary: >- + Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the + user's mailbox. + + + The `makeEwsRequestAsync` method sends an EWS request on behalf of the add-in to Exchange. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - In February 2025, legacy Exchange [user + identity](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token) and + [callback](https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens) tokens will be + turned off by default for all Exchange Online tenants. This is part of [Microsoft's Secure Future + Initiative](https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/), which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity + tokens will still work for Exchange on-premises. Nested app authentication (NAA) is the recommended approach for + tokens going forward. For more information, see the [FAQ page](https://aka.ms/naafaq). + + + - To enable the `makeEwsRequestAsync` method to make EWS requests, the server administrator must set + `OAuthAuthentication` to `true` on the Client Access Server EWS directory . + + + - Your add-in must have the **read/write mailbox** permission to use the `makeEwsRequestAsync` method. For + information about using the **read/write mailbox** permission and the EWS operations that you can call with + the `makeEwsRequestAsync` method, see [Specify permissions for mail add-in access to the user's + mailbox](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions). + + + - If your add-in needs to access Folder Associated Items or its XML request must specify UTF-8 encoding (`\`), it must use Microsoft Graph or REST APIs to access the user's mailbox + instead. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - This method isn't supported when the add-in is loaded in a Gmail mailbox. + + + - When you use the `makeEwsRequestAsync` method in add-ins that run in Outlook versions earlier than Version + 15.0.4535.1004, you must set the encoding value to ISO-8859-1 (``). To determine the version of an Outlook client, use the `mailbox.diagnostics.hostVersion` property. You don't + need to set the encoding value when your add-in is running in Outlook on the web or [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627). To determine the + Outlook client in which your add-in is running, use the `mailbox.diagnostics.hostName` property. + + + #### Examples + + + ```TypeScript + + function getSubjectRequest(id) { + // Return a GetItem operation request for the subject of the specified item. + const request = + '' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' IdOnly' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + + return request; + } + + + function sendRequest() { + // Create a local variable that contains the mailbox. + Office.context.mailbox.makeEwsRequestAsync( + getSubjectRequest(mailbox.item.itemId), callback); + } + + + function callback(asyncResult) { + const result = asyncResult.value; + const context = asyncResult.asyncContext; + + // Process the returned response here. + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/get-icaluid-as-attendee.yaml + + + const ewsId = Office.context.mailbox.item.itemId; + + const request = ` + + + + + AllProperties + + + + + + + `; + + Office.context.mailbox.makeEwsRequestAsync(request, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + console.log(getUID(result.value)); + }); + + + ... + + + const request = ''+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ' Hello, Outlook!'+ + ' This message was sent from a ScriptLab code sample, used from ' + Office.context.mailbox.diagnostics.hostName + ', version ' + Office.context.mailbox.diagnostics.hostVersion + '!'+ + ' '+ + ' ' + Office.context.mailbox.userProfile.emailAddress + ''+ + ' '+ + ' '+ + ' '+ + ' '+ + ' '+ + ''; + + Office.context.mailbox.makeEwsRequestAsync(request, (result) => { + console.log(result); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + makeEwsRequestAsync(data: any, callback: (asyncResult: Office.AsyncResult) => void, userContext?: + any): void; + parameters: + - id: data + description: The EWS request. + type: any + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The XML response of the EWS + request is provided as a string in the `asyncResult.value` property. In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic (starting in + Version 2303, Build 16225.10000)), and on Mac (starting in Version 16.73 (23042601)), if the response + exceeds 5 MB in size, an error message is returned in the `asyncResult.error` property. In earlier versions + of Outlook on Windows (classic) and on Mac, an error message is returned if the response exceeds 1 MB in + size. + type: '(asyncResult: <string>) => void' + - id: userContext + description: Optional. Any state data that is passed to the asynchronous method. + type: any + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, options, callback)' + uid: 'outlook!Office.Mailbox#removeHandlerAsync:member(1)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, options, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Mailbox object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events). + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: options + description: 'Provides an option for preserving context data of any type, unchanged, for use in a callback.' + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, callback)' + uid: 'outlook!Office.Mailbox#removeHandlerAsync:member(2)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Mailbox object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events). + remarks: >- + \[ [API set: Mailbox 1.5](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.removeHandlerAsync(Office.EventType.OfficeThemeChanged, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to remove event handler: " + asyncResult.error.message); + return; + } + + console.log("Event handler removed successfully."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.actiontype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.actiontype.yml new file mode 100644 index 0000000000..d0f26263b2 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.actiontype.yml @@ -0,0 +1,53 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.ActionType +uid: 'outlook!Office.MailboxEnums.ActionType:enum' +package: outlook! +fullName: Office.MailboxEnums.ActionType +summary: Specifies the type of custom action in a notification message. +remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds an informational message with actions to the mail item. + + const id = $("#notificationId").val().toString(); + + + const itemId = Office.context.mailbox.item.itemId; + + const details = { + type: Office.MailboxEnums.ItemNotificationMessageType.InsightMessage, + message: "This is an insight notification with id = " + id, + icon: "icon1", + actions: [ + { + actionText: "Open insight", + actionType: Office.MailboxEnums.ActionType.ShowTaskPane, + // Identify whether the current mail item is in read or compose mode to set the appropriate commandId value. + commandId: (itemId == undefined ? "PG.HelpCommand.Compose" : "PG.HelpCommand.Read"), + contextData: { a: "aValue", b: "bValue" } + } + ] + }; + + + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: ShowTaskPane + uid: 'outlook!Office.MailboxEnums.ActionType.ShowTaskPane:member' + package: outlook! + summary: The `showTaskPane` action. + value: '"showTaskPane"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.appointmentsensitivitytype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.appointmentsensitivitytype.yml new file mode 100644 index 0000000000..ad2c61184d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.appointmentsensitivitytype.yml @@ -0,0 +1,65 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.AppointmentSensitivityType +uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType:enum' +package: outlook! +fullName: Office.MailboxEnums.AppointmentSensitivityType +summary: 'Specifies the [sensitivity level](xref:outlook!Office.Sensitivity:interface) of an appointment.' +remarks: >- + \[ [API set: Mailbox 1.14](/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/90-other-item-apis/get-set-sensitivity-level.yaml + + + Office.context.mailbox.item.sensitivity.setAsync( + Office.MailboxEnums.AppointmentSensitivityType.Private, + function callback(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Failed to set appointment sensitivity: " + JSON.stringify(asyncResult.error)); + } else { + console.log("Successfully set appointment sensitivity."); + } + } + ); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Normal + uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType.Normal:member' + package: outlook! + summary: The item needs no special treatment. + value: '"normal"' + - name: Personal + uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType.Personal:member' + package: outlook! + summary: |- + Treat the item as personal. + + **Important**: The Personal sensitivity level is only supported in Outlook on Windows. + value: '"personal"' + - name: Private + uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType.Private:member' + package: outlook! + summary: Treat the item as private. + value: '"private"' + - name: Confidential + uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType.Confidential:member' + package: outlook! + summary: |- + Treat the item as confidential. + + **Important**: The Confidential sensitivity level is only supported in Outlook on Windows. + value: '"confidential"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentcontentformat.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentcontentformat.yml new file mode 100644 index 0000000000..9cb3d5c236 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentcontentformat.yml @@ -0,0 +1,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"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentstatus.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentstatus.yml new file mode 100644 index 0000000000..04417a375c --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmentstatus.yml @@ -0,0 +1,47 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.AttachmentStatus +uid: 'outlook!Office.MailboxEnums.AttachmentStatus:enum' +package: outlook! +fullName: Office.MailboxEnums.AttachmentStatus +summary: Specifies whether an attachment was added to or removed from an item. +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 + + // Get the attachment that was just added to a message or appointment. + + function myHandlerFunction(eventarg) { + if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = eventarg.attachmentDetails; + console.log("Event Fired and Attachment Added!"); + getAttachmentContentAsync(attachment.id, options, callback); + } + } + + + Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Added + uid: 'outlook!Office.MailboxEnums.AttachmentStatus.Added:member' + package: outlook! + summary: An attachment was added to the item. + value: '"added"' + - name: Removed + uid: 'outlook!Office.MailboxEnums.AttachmentStatus.Removed:member' + package: outlook! + summary: An attachment was removed from the item. + value: '"removed"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmenttype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmenttype.yml new file mode 100644 index 0000000000..2649342037 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.attachmenttype.yml @@ -0,0 +1,91 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.AttachmentType +uid: 'outlook!Office.MailboxEnums.AttachmentType:enum' +package: outlook! +fullName: Office.MailboxEnums.AttachmentType +summary: Specifies the attachment's type. +remarks: >- + **[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/attachments-compose.yaml + + + Office.context.mailbox.item.getAttachmentsAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + if (result.value.length > 0) { + for (let i = 0; i < result.value.length; i++) { + const attachment = result.value[i]; + let attachmentType; + switch (attachment.attachmentType) { + case Office.MailboxEnums.AttachmentType.Cloud: + attachmentType = "Attachment is stored in a cloud location"; + break; + case Office.MailboxEnums.AttachmentType.File: + attachmentType = "Attachment is a file"; + break; + case Office.MailboxEnums.AttachmentType.Item: + attachmentType = "Attachment is an Exchange item"; + break; + } + console.log( + "ID: " + + attachment.id + + "\n" + + "Type: " + + attachmentType + + "\n" + + "Name: " + + attachment.name + + "\n" + + "Size: " + + attachment.size + + "\n" + + "isInline: " + + attachment.isInline + ); + } + } else { + console.log("No attachments on this message."); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: File + uid: 'outlook!Office.MailboxEnums.AttachmentType.File:member' + package: outlook! + summary: The attachment is a file. + value: '"file"' + - name: Item + uid: 'outlook!Office.MailboxEnums.AttachmentType.Item:member' + package: outlook! + summary: The attachment is an Exchange item. + value: '"item"' + - name: Cloud + uid: 'outlook!Office.MailboxEnums.AttachmentType.Cloud:member' + package: outlook! + summary: >- + The attachment is stored in a cloud location, such as OneDrive. + + + **Important**: In Read mode, the `id` property of the attachment's + [details](xref:outlook!Office.AttachmentDetails:interface) object contains a URL to the file. From requirement set + 1.8, the `url` property included in the attachment's + [details](https://learn.microsoft.com/javascript/api/outlook/office.attachmentdetailscompose?view=outlook-js-1.8) + object contains a URL to the file in Compose mode. + value: '"cloud"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.categorycolor.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.categorycolor.yml new file mode 100644 index 0000000000..a6d4edaaf5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.categorycolor.yml @@ -0,0 +1,159 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.CategoryColor +uid: 'outlook!Office.MailboxEnums.CategoryColor:enum' +package: outlook! +fullName: Office.MailboxEnums.CategoryColor +summary: Specifies the category color. +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 + + + **Important**: The actual color depends on how the Outlook client renders it. In this case, the colors noted on + each preset apply to Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac (starting + in Version 16.78). + + + Earlier versions of Outlook on Mac had a bug that displayed incorrect preset colors. This has now been fixed starting + in Version 16.78. If you've recently updated your Outlook client, you need to adjust the category colors in your + add-in to match the updated preset values. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-master-categories.yaml + + + const masterCategoriesToAdd = [ + { + displayName: "TestCategory", + color: Office.MailboxEnums.CategoryColor.Preset0 + } + ]; + + + Office.context.mailbox.masterCategories.addAsync(masterCategoriesToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully added categories to master list"); + } else { + console.log("masterCategories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: None + uid: 'outlook!Office.MailboxEnums.CategoryColor.None:member' + package: outlook! + summary: Default color or no color mapped. + - name: Preset0 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset0:member' + package: outlook! + summary: Red + - name: Preset1 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset1:member' + package: outlook! + summary: Orange + - name: Preset2 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset2:member' + package: outlook! + summary: Brown + - name: Preset3 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset3:member' + package: outlook! + summary: Yellow + - name: Preset4 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset4:member' + package: outlook! + summary: Green + - name: Preset5 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset5:member' + package: outlook! + summary: Teal + - name: Preset6 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset6:member' + package: outlook! + summary: Olive + - name: Preset7 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset7:member' + package: outlook! + summary: Blue + - name: Preset8 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset8:member' + package: outlook! + summary: Purple + - name: Preset9 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset9:member' + package: outlook! + summary: Cranberry + - name: Preset10 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset10:member' + package: outlook! + summary: Steel + - name: Preset11 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset11:member' + package: outlook! + summary: DarkSteel + - name: Preset12 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset12:member' + package: outlook! + summary: Gray + - name: Preset13 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset13:member' + package: outlook! + summary: DarkGray + - name: Preset14 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset14:member' + package: outlook! + summary: Black + - name: Preset15 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset15:member' + package: outlook! + summary: DarkRed + - name: Preset16 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset16:member' + package: outlook! + summary: DarkOrange + - name: Preset17 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset17:member' + package: outlook! + summary: DarkBrown + - name: Preset18 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset18:member' + package: outlook! + summary: DarkYellow + - name: Preset19 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset19:member' + package: outlook! + summary: DarkGreen + - name: Preset20 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset20:member' + package: outlook! + summary: DarkTeal + - name: Preset21 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset21:member' + package: outlook! + summary: DarkOlive + - name: Preset22 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset22:member' + package: outlook! + summary: DarkBlue + - name: Preset23 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset23:member' + package: outlook! + summary: DarkPurple + - name: Preset24 + uid: 'outlook!Office.MailboxEnums.CategoryColor.Preset24:member' + package: outlook! + summary: DarkCranberry diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.composetype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.composetype.yml new file mode 100644 index 0000000000..3b448370e5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.composetype.yml @@ -0,0 +1,58 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.ComposeType +uid: 'outlook!Office.MailboxEnums.ComposeType:enum' +package: outlook! +fullName: Office.MailboxEnums.ComposeType +summary: Specifies a message's compose type. +remarks: >- + \[ [API set: Mailbox 1.10](/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 + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Get the compose type of the current message. + + Office.context.mailbox.item.getComposeTypeAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log( + "getComposeTypeAsync succeeded with composeType: " + + asyncResult.value.composeType + + " and coercionType: " + + asyncResult.value.coercionType + ); + } else { + console.error(asyncResult.error); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Reply + uid: 'outlook!Office.MailboxEnums.ComposeType.Reply:member' + package: outlook! + summary: Reply. + value: '"reply"' + - name: NewMail + uid: 'outlook!Office.MailboxEnums.ComposeType.NewMail:member' + package: outlook! + summary: New mail. + value: '"newMail"' + - name: Forward + uid: 'outlook!Office.MailboxEnums.ComposeType.Forward:member' + package: outlook! + summary: Forward. + value: '"forward"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.days.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.days.yml new file mode 100644 index 0000000000..78c79d656b --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.days.yml @@ -0,0 +1,123 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.Days +uid: 'outlook!Office.MailboxEnums.Days:enum' +package: outlook! +fullName: Office.MailboxEnums.Days +summary: Specifies the day of week or type of day. +remarks: >- + \[ [API set: Mailbox 1.7](/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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Mon + uid: 'outlook!Office.MailboxEnums.Days.Mon:member' + package: outlook! + summary: Monday + value: '"mon"' + - name: Tue + uid: 'outlook!Office.MailboxEnums.Days.Tue:member' + package: outlook! + summary: Tuesday + value: '"tue"' + - name: Wed + uid: 'outlook!Office.MailboxEnums.Days.Wed:member' + package: outlook! + summary: Wednesday + value: '"wed"' + - name: Thu + uid: 'outlook!Office.MailboxEnums.Days.Thu:member' + package: outlook! + summary: Thursday + value: '"thu"' + - name: Fri + uid: 'outlook!Office.MailboxEnums.Days.Fri:member' + package: outlook! + summary: Friday + value: '"fri"' + - name: Sat + uid: 'outlook!Office.MailboxEnums.Days.Sat:member' + package: outlook! + summary: Saturday + value: '"sat"' + - name: Sun + uid: 'outlook!Office.MailboxEnums.Days.Sun:member' + package: outlook! + summary: Sunday + value: '"sun"' + - name: Weekday + uid: 'outlook!Office.MailboxEnums.Days.Weekday:member' + package: outlook! + summary: 'Week day (excludes weekend days): ''Mon'', ''Tue'', ''Wed'', ''Thu'', and ''Fri''.' + value: '"weekday"' + - name: WeekendDay + uid: 'outlook!Office.MailboxEnums.Days.WeekendDay:member' + package: outlook! + summary: 'Weekend day: ''Sat'' and ''Sun''.' + value: '"weekendDay"' + - name: Day + uid: 'outlook!Office.MailboxEnums.Days.Day:member' + package: outlook! + summary: Day of week. + value: '"day"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.delegatepermissions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.delegatepermissions.yml new file mode 100644 index 0000000000..c9d17a1913 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.delegatepermissions.yml @@ -0,0 +1,69 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.DelegatePermissions +uid: 'outlook!Office.MailboxEnums.DelegatePermissions:enum' +package: outlook! +fullName: Office.MailboxEnums.DelegatePermissions +summary: This bitmask represents a delegate's permissions on a shared folder. +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 + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + + const delegatePermissions = result.value.delegatePermissions; + + // Check if the user has write permissions to the shared resource. + if ((delegatePermissions & Office.MailboxEnums.DelegatePermissions.Write) != 0) { + console.log("User has write permissions to the shared resource."); + // Perform the necessary operations. + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Read + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.Read:member' + package: outlook! + summary: Delegate has permission to read items. + value: '1' + - name: Write + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.Write:member' + package: outlook! + summary: Delegate has permission to create and write items. + value: '2' + - name: DeleteOwn + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.DeleteOwn:member' + package: outlook! + summary: Delegate has permission to delete only the items they created. + value: '4' + - name: DeleteAll + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.DeleteAll:member' + package: outlook! + summary: Delegate has permission to delete any items. + value: '8' + - name: EditOwn + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.EditOwn:member' + package: outlook! + summary: Delegate has permission to edit only they items they created. + value: '16' + - name: EditAll + uid: 'outlook!Office.MailboxEnums.DelegatePermissions.EditAll:member' + package: outlook! + summary: Delegate has permission to edit any items. + value: '32' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.entitytype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.entitytype.yml new file mode 100644 index 0000000000..d46b8f105a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.entitytype.yml @@ -0,0 +1,58 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.EntityType +uid: 'outlook!Office.MailboxEnums.EntityType:enum' +package: outlook! +fullName: Office.MailboxEnums.EntityType +summary: >- + Specifies an entity's type. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +fields: + - name: MeetingSuggestion + uid: 'outlook!Office.MailboxEnums.EntityType.MeetingSuggestion:member' + package: outlook! + summary: Specifies that the entity is a meeting suggestion. + value: '"meetingSuggestion"' + - name: TaskSuggestion + uid: 'outlook!Office.MailboxEnums.EntityType.TaskSuggestion:member' + package: outlook! + summary: Specifies that the entity is a task suggestion. + value: '"taskSuggestion"' + - name: Address + uid: 'outlook!Office.MailboxEnums.EntityType.Address:member' + package: outlook! + summary: Specifies that the entity is a postal address. + value: '"address"' + - name: EmailAddress + uid: 'outlook!Office.MailboxEnums.EntityType.EmailAddress:member' + package: outlook! + summary: Specifies that the entity is an SMTP email address. + value: '"emailAddress"' + - name: Url + uid: 'outlook!Office.MailboxEnums.EntityType.Url:member' + package: outlook! + summary: Specifies that the entity is an Internet URL. + value: '"url"' + - name: PhoneNumber + uid: 'outlook!Office.MailboxEnums.EntityType.PhoneNumber:member' + package: outlook! + summary: Specifies that the entity is a US phone number. + value: '"phoneNumber"' + - name: Contact + uid: 'outlook!Office.MailboxEnums.EntityType.Contact:member' + package: outlook! + summary: Specifies that the entity is a contact. + value: '"contact"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobaractiontype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobaractiontype.yml new file mode 100644 index 0000000000..2dfdce4686 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobaractiontype.yml @@ -0,0 +1,54 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.InfobarActionType +uid: 'outlook!Office.MailboxEnums.InfobarActionType:enum' +package: outlook! +fullName: Office.MailboxEnums.InfobarActionType +summary: >- + Action types supported by + [Office.EventType.InfobarClicked](https://learn.microsoft.com/javascript/api/office/office.eventtype). +remarks: |- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + /* + * This snippet activates when a notification message is dismissed from an Outlook message or appointment. + * The event handler logs the custom action and notification type to the console. + */ + Office.context.mailbox.item.addHandlerAsync(Office.EventType.InfobarClicked, eventHandler, callback); + + function eventHandler(event) { + const infobarDetails = event.infobarDetails; + + // Log the custom action type. + console.log(`Custom action type: ${infobarDetails.actionType}`); + + // Log the notification type. + switch (infobarDetails.infobarType) { + case Office.MailboxEnums.InfobarType.Error: + console.log("Notification type: Error message"); + break; + case Office.MailboxEnums.InfobarType.Informational: + console.log("Notification type: Informational message"); + break; + case Office.MailboxEnums.InfobarType.Insight: + console.log("Notification type: Informational message with available actions from the task pane"); + break; + case Office.MailboxEnums.InfobarType.ProgressIndicator: + console.log("Notification type: Progress indicator"); + break; + } + } + ``` +isPreview: false +isDeprecated: false +fields: + - name: Dismiss + uid: 'outlook!Office.MailboxEnums.InfobarActionType.Dismiss:member' + package: outlook! + summary: |- + Dismiss action was selected. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '1' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobartype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobartype.yml new file mode 100644 index 0000000000..857588ecb0 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.infobartype.yml @@ -0,0 +1,78 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.InfobarType +uid: 'outlook!Office.MailboxEnums.InfobarType:enum' +package: outlook! +fullName: Office.MailboxEnums.InfobarType +summary: >- + Type of notification allowed by + [Office.EventType.InfobarClicked](https://learn.microsoft.com/javascript/api/office/office.eventtype). +remarks: |- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + /* + * This snippet activates when a notification message is dismissed from an Outlook message or appointment. + * The event handler logs the custom action and notification type to the console. + */ + Office.context.mailbox.item.addHandlerAsync(Office.EventType.InfobarClicked, eventHandler, callback); + + function eventHandler(event) { + const infobarDetails = event.infobarDetails; + + // Log the custom action type. + console.log(`Custom action type: ${infobarDetails.actionType}`); + + // Log the notification type. + switch (infobarDetails.infobarType) { + case Office.MailboxEnums.InfobarType.Error: + console.log("Notification type: Error message"); + break; + case Office.MailboxEnums.InfobarType.Informational: + console.log("Notification type: Informational message"); + break; + case Office.MailboxEnums.InfobarType.Insight: + console.log("Notification type: Informational message with available actions from the task pane"); + break; + case Office.MailboxEnums.InfobarType.ProgressIndicator: + console.log("Notification type: Progress indicator"); + break; + } + } + ``` +isPreview: false +isDeprecated: false +fields: + - name: Informational + uid: 'outlook!Office.MailboxEnums.InfobarType.Informational:member' + package: outlook! + summary: |- + Notification displays an informational message. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '0' + - name: ProgressIndicator + uid: 'outlook!Office.MailboxEnums.InfobarType.ProgressIndicator:member' + package: outlook! + summary: |- + Notification displays a progress indicator. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '1' + - name: Error + uid: 'outlook!Office.MailboxEnums.InfobarType.Error:member' + package: outlook! + summary: |- + Notification displays an error message. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '2' + - name: Insight + uid: 'outlook!Office.MailboxEnums.InfobarType.Insight:member' + package: outlook! + summary: |- + Notification displays an informational message with actions. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '3' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemnotificationmessagetype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemnotificationmessagetype.yml new file mode 100644 index 0000000000..506c1f8664 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemnotificationmessagetype.yml @@ -0,0 +1,65 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.ItemNotificationMessageType +uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType:enum' +package: outlook! +fullName: Office.MailboxEnums.ItemNotificationMessageType +summary: Specifies the notification message type for an appointment or message. +remarks: >- + \[ [API set: Mailbox 1.3](/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/35-notifications/add-getall-remove.yaml + + + // Adds an error notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ErrorMessage, + message: "Error notification message with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: ProgressIndicator + uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator:member' + package: outlook! + summary: The notification message is a progress indicator. + value: '"progressIndicator"' + - name: InformationalMessage + uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage:member' + package: outlook! + summary: The notification message is an informational message. + value: '"informationalMessage"' + - name: ErrorMessage + uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType.ErrorMessage:member' + package: outlook! + summary: |- + The notification message is an error message. + + **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + value: '"errorMessage"' + - name: InsightMessage + uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType.InsightMessage:member' + package: outlook! + summary: |- + The notification message is an informational message with actions. + + * \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + value: '"insightMessage"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemtype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemtype.yml new file mode 100644 index 0000000000..a5e5445d97 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.itemtype.yml @@ -0,0 +1,46 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.ItemType +uid: 'outlook!Office.MailboxEnums.ItemType:enum' +package: outlook! +fullName: Office.MailboxEnums.ItemType +summary: Specifies an item's type. +remarks: >- + **[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/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Message + uid: 'outlook!Office.MailboxEnums.ItemType.Message:member' + package: outlook! + summary: 'An email, meeting request, meeting response, or meeting cancellation.' + value: '"message"' + - name: Appointment + uid: 'outlook!Office.MailboxEnums.ItemType.Appointment:member' + package: outlook! + summary: An appointment item. + value: '"appointment"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.locationtype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.locationtype.yml new file mode 100644 index 0000000000..8ad420e541 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.locationtype.yml @@ -0,0 +1,64 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.LocationType +uid: 'outlook!Office.MailboxEnums.LocationType:enum' +package: outlook! +fullName: Office.MailboxEnums.LocationType +summary: Specifies an appointment location's type. +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/90-other-item-apis/get-add-remove-enhancedlocation-appointment.yaml + + + const locations = [ + { + id: "Contoso", + type: Office.MailboxEnums.LocationType.Custom + }, + { + id: "room500@test.com", + type: Office.MailboxEnums.LocationType.Room + } + ]; + + Office.context.mailbox.item.enhancedLocation.addAsync(locations, (result) => { + if (result.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully added locations ${JSON.stringify(locations)}`); + } else { + console.error(`Failed to add locations. Error message: ${result.error.message}`); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Custom + uid: 'outlook!Office.MailboxEnums.LocationType.Custom:member' + package: outlook! + summary: >- + A custom location. Custom locations don't have an SMTP address. + + + **Note**: [Personal contact groups](https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023) + added as appointment locations aren't returned by the + [EnhancedLocation.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocation#outlook-office-enhancedlocation-getasync-member(1)) + method. + value: '"custom"' + - name: Room + uid: 'outlook!Office.MailboxEnums.LocationType.Room:member' + package: outlook! + summary: A conference room or similar resource that has an SMTP address. + value: '"room"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.month.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.month.yml new file mode 100644 index 0000000000..f53cd48e8d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.month.yml @@ -0,0 +1,133 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.Month +uid: 'outlook!Office.MailboxEnums.Month:enum' +package: outlook! +fullName: Office.MailboxEnums.Month +summary: Specifies the month. +remarks: >- + \[ [API set: Mailbox 1.7](/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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Jan + uid: 'outlook!Office.MailboxEnums.Month.Jan:member' + package: outlook! + summary: January + value: '"jan"' + - name: Feb + uid: 'outlook!Office.MailboxEnums.Month.Feb:member' + package: outlook! + summary: February + value: '"feb"' + - name: Mar + uid: 'outlook!Office.MailboxEnums.Month.Mar:member' + package: outlook! + summary: March + value: '"mar"' + - name: Apr + uid: 'outlook!Office.MailboxEnums.Month.Apr:member' + package: outlook! + summary: April + value: '"apr"' + - name: May + uid: 'outlook!Office.MailboxEnums.Month.May:member' + package: outlook! + summary: May + value: '"may"' + - name: Jun + uid: 'outlook!Office.MailboxEnums.Month.Jun:member' + package: outlook! + summary: June + value: '"jun"' + - name: Jul + uid: 'outlook!Office.MailboxEnums.Month.Jul:member' + package: outlook! + summary: July + value: '"jul"' + - name: Aug + uid: 'outlook!Office.MailboxEnums.Month.Aug:member' + package: outlook! + summary: August + value: '"aug"' + - name: Sep + uid: 'outlook!Office.MailboxEnums.Month.Sep:member' + package: outlook! + summary: September + value: '"sep"' + - name: Oct + uid: 'outlook!Office.MailboxEnums.Month.Oct:member' + package: outlook! + summary: October + value: '"oct"' + - name: Nov + uid: 'outlook!Office.MailboxEnums.Month.Nov:member' + package: outlook! + summary: November + value: '"nov"' + - name: Dec + uid: 'outlook!Office.MailboxEnums.Month.Dec:member' + package: outlook! + summary: December + value: '"dec"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.movespamitemto.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.movespamitemto.yml new file mode 100644 index 0000000000..4e9001777f --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.movespamitemto.yml @@ -0,0 +1,92 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.MoveSpamItemTo +uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo:enum' +package: outlook! +fullName: Office.MailboxEnums.MoveSpamItemTo +summary: >- + Specifies the folder to which a reported spam or phishing message is moved once it's processed by a spam-reporting + add-in. + + + To learn more about the integrated spam-reporting feature, see [Implement an integrated spam-reporting + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting). +remarks: >- + \[ [API set: Mailbox 1.14](/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)**: + Message Read + + + **Important**: This enum can only be used to assign values to the + [moveItemTo](https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions#outlook-office-spamreportingeventcompletedoptions-moveitemto-member) + property of the + [event.completed](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + method. If you're on an Outlook on Windows version that only supports the `postProcessingAction` property, you must + assign it different string values. For a list of supported string values, see + [Office.SpamReportingEventCompletedOptions.postProcessingAction](https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions#outlook-office-spamreportingeventcompletedoptions-postprocessingaction-member). + + + #### Examples + + + ```TypeScript + + // The following example handles a SpamReporting event to process a reported spam or phishing message. + + function onSpamReport(event) { + // Get the Base64-encoded EML format of a reported message. + Office.context.mailbox.item.getAsFileAsync({ asyncContext: event }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(`Error encountered during message processing: ${asyncResult.error.message}`); + return; + } + + // Run additional processing operations here. + + /** + * Signal that the spam-reporting event has completed processing. + * It then moves the reported message to a custom mailbox folder named "Reported Messages" + * and shows a post-processing dialog to the user. + * If an error occurs while the message is being processed, the `onErrorDeleteItem` + * property determines whether the message will be deleted. + */ + const event = asyncResult.asyncContext; + event.completed({ + moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder, + folderName: "Reported Messages", + onErrorDeleteItem: true, + showPostProcessingDialog: { + title: "Contoso Spam Reporting", + description: "Thank you for reporting this message.", + }, + }); + }); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: CustomFolder + uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo.CustomFolder:member' + package: outlook! + summary: Specifies that a reported message is moved to a custom folder in the mailbox. + value: '"customFolder"' + - name: DeletedItemsFolder + uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo.DeletedItemsFolder:member' + package: outlook! + summary: Specifies that a reported message is moved to the **Deleted Items** folder of the mailbox. + value: '"deletedItemsFolder"' + - name: JunkFolder + uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo.JunkFolder:member' + package: outlook! + summary: Specifies that a reported message is moved to the **Junk Email** folder of the mailbox. + value: '"junkFolder"' + - name: NoMove + uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo.NoMove:member' + package: outlook! + summary: Specifies that a reported message remains in its current folder in the mailbox. + value: '"noMove"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.openlocation.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.openlocation.yml new file mode 100644 index 0000000000..f8d87420bc --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.openlocation.yml @@ -0,0 +1,71 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.OpenLocation +uid: 'outlook!Office.MailboxEnums.OpenLocation:enum' +package: outlook! +fullName: Office.MailboxEnums.OpenLocation +summary: Specifies the location from which an add-in wants to access data. +remarks: >- + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose, Read + + + **Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn + more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Checks if the add-in can access data from the device's photo library. + + const isOpenFromPhotoLibraryAllowed = + Office.context.mailbox.getIsOpenFromLocationAllowed(Office.MailboxEnums.OpenLocation.PhotoLibrary); + + if (isOpenFromPhotoLibraryAllowed) { + console.log("Access to the photo library is allowed."); + // Do something. + } else { + console.log("Access to the photo library isn't allowed."); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: AccountDocument + uid: 'outlook!Office.MailboxEnums.OpenLocation.AccountDocument:member' + package: outlook! + summary: A location associated with an account within an add-in. + - name: Camera + uid: 'outlook!Office.MailboxEnums.OpenLocation.Camera:member' + package: outlook! + summary: The device's camera. + - name: Local + uid: 'outlook!Office.MailboxEnums.OpenLocation.Local:member' + package: outlook! + summary: Local storage on a device. + - name: OnedriveForBusiness + uid: 'outlook!Office.MailboxEnums.OpenLocation.OnedriveForBusiness:member' + package: outlook! + summary: |- + OneDrive for Business. + + **Important**: For OneDrive Personal, use OTHER. + - name: Other + uid: 'outlook!Office.MailboxEnums.OpenLocation.Other:member' + package: outlook! + summary: 'Other cloud storage providers, including OneDrive Personal.' + - name: PhotoLibrary + uid: 'outlook!Office.MailboxEnums.OpenLocation.PhotoLibrary:member' + package: outlook! + summary: The device's photo library. + - name: SharePoint + uid: 'outlook!Office.MailboxEnums.OpenLocation.SharePoint:member' + package: outlook! + summary: >- + SharePoint. Includes both SharePoint Online and SharePoint on-premises (if accessed with a Microsoft Entra ID + account). diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.owaview.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.owaview.yml new file mode 100644 index 0000000000..b767ae7c1a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.owaview.yml @@ -0,0 +1,78 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.OWAView +uid: 'outlook!Office.MailboxEnums.OWAView:enum' +package: outlook! +fullName: Office.MailboxEnums.OWAView +summary: Represents the current view of Outlook on the web. +remarks: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml + + + // This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the + console. + + const diagnostics = Office.context.mailbox.diagnostics; + + console.log(`Client application: ${diagnostics.hostName}`); + + console.log(`Client version: ${diagnostics.hostVersion}`); + + + switch (diagnostics.OWAView) { + case undefined: + console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use."); + break; + case Office.MailboxEnums.OWAView.OneColumnNarrow: + console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.OneColumn: + console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone"); + break; + case Office.MailboxEnums.OWAView.TwoColumns: + console.log("Current view (Outlook on the web only): Viewed from a tablet"); + break; + case Office.MailboxEnums.OWAView.ThreeColumns: + console.log("Current view (Outlook on the web only): Viewed from a desktop computer"); + break; + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: OneColumnNarrow + uid: 'outlook!Office.MailboxEnums.OWAView.OneColumnNarrow:member' + package: outlook! + summary: >- + Narrow one-column view. Displayed when the screen width is less than 436 pixels. For example, Outlook on the web + uses this view on the entire screen of older smartphones. + value: '"OneColumnNarrow"' + - name: OneColumn + uid: 'outlook!Office.MailboxEnums.OWAView.OneColumn:member' + package: outlook! + summary: >- + One-column view. Displayed when the screen width is greater than or equal to 436 pixels, but less than 536 pixels. + For example, Outlook on the web uses this view on the entire screen of newer smartphones. + value: '"OneColumn"' + - name: TwoColumns + uid: 'outlook!Office.MailboxEnums.OWAView.TwoColumns:member' + package: outlook! + summary: >- + Two-column view. Displayed when the screen width is greater than or equal to 536 pixels, but less than 780 pixels. + For example, Outlook on the web uses this view on most tablets. + value: '"TwoColumns"' + - name: ThreeColumns + uid: 'outlook!Office.MailboxEnums.OWAView.ThreeColumns:member' + package: outlook! + summary: >- + Three-column view. Displayed when the screen width is greater than or equal to 780 pixels. For example, Outlook on + the web uses this view in a full screen window on a desktop computer. + value: '"ThreeColumns"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recipienttype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recipienttype.yml new file mode 100644 index 0000000000..8d8acf6612 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recipienttype.yml @@ -0,0 +1,121 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.RecipientType +uid: 'outlook!Office.MailboxEnums.RecipientType:enum' +package: outlook! +fullName: Office.MailboxEnums.RecipientType +summary: Specifies the type of recipient of a message or appointment. +remarks: >- + \[ [API set: Mailbox 1.1](/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 + + + **Important**: A `recipientType` property value isn't returned by the + [Office.context.mailbox.item.from.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1)) + and + [Office.context.mailbox.item.organizer.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1)) + methods. The email sender or appointment organizer is always a user whose email address is on the Exchange server. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-to-message-read.yaml + + + const msgTo = Office.context.mailbox.item.to; + + const distributionLists = []; + + const externalRecipients = []; + + const internalRecipients = []; + + const otherRecipients = []; + + for (let i = 0; i < msgTo.length; i++) { + switch (msgTo[i].recipientType) { + case Office.MailboxEnums.RecipientType.DistributionList: + distributionLists.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.ExternalUser: + externalRecipients.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.User: + internalRecipients.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.Other: + otherRecipients.push(msgTo[i]); + } + } + + + if (distributionLists.length > 0) { + console.log("Distribution Lists:"); + distributionLists.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (externalRecipients.length > 0) { + console.log("External Recipients:"); + externalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (internalRecipients.length > 0) { + console.log("Internal Recipients:"); + internalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (otherRecipients.length > 0) { + console.log("Other Recipients:"); + otherRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: DistributionList + uid: 'outlook!Office.MailboxEnums.RecipientType.DistributionList:member' + package: outlook! + summary: Specifies the recipient is a distribution list containing a list of email addresses. + value: '"distributionList"' + - name: User + uid: 'outlook!Office.MailboxEnums.RecipientType.User:member' + package: outlook! + summary: Specifies the recipient is an SMTP email address on the Exchange server. + value: '"user"' + - name: ExternalUser + uid: 'outlook!Office.MailboxEnums.RecipientType.ExternalUser:member' + package: outlook! + summary: >- + Specifies the recipient is an SMTP email address that isn't on the Exchange server. It also refers to a recipient + added from a personal Outlook address book. + + + **Important**: In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic (starting with + Version 2210, Build 15813.20002)), and on Mac, Global Address Book (GAL) recipients saved to a personal address + book return the `ExternalUser` value, even if their SMTP email address appears on the Exchange server. Recipients + return a `User` value only if they're directly added or resolved against the GAL. + value: '"externalUser"' + - name: Other + uid: 'outlook!Office.MailboxEnums.RecipientType.Other:member' + package: outlook! + summary: >- + Specifies the recipient isn't one of the other recipient types. It also refers to a recipient that isn't resolved + against the Exchange address book, and is therefore treated as an external SMTP address. + + + **Important**: In Outlook on Android and on iOS, Global Address Book (GAL) recipients saved to a personal + address book return the `Other` value, even if their SMTP email address appears on the Exchange server. Recipients + return a `User` value only if they're directly added or resolved against the GAL. + value: '"other"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetimezone.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetimezone.yml new file mode 100644 index 0000000000..d04a264276 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetimezone.yml @@ -0,0 +1,753 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.RecurrenceTimeZone +uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone:enum' +package: outlook! +fullName: Office.MailboxEnums.RecurrenceTimeZone +summary: Specifies the time zone applied to the recurrence. +remarks: >- + \[ [API set: Mailbox 1.7](/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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: AfghanistanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AfghanistanStandardTime:member' + package: outlook! + summary: Afghanistan Standard Time + value: '"Afghanistan Standard Time"' + - name: AlaskanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AlaskanStandardTime:member' + package: outlook! + summary: Alaskan Standard Time + value: '"Alaskan Standard Time"' + - name: AleutianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AleutianStandardTime:member' + package: outlook! + summary: Aleutian Standard Time + value: '"Aleutian Standard Time"' + - name: AltaiStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AltaiStandardTime:member' + package: outlook! + summary: Altai Standard Time + value: '"Altai Standard Time"' + - name: ArabStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ArabStandardTime:member' + package: outlook! + summary: Arab Standard Time + value: '"Arab Standard Time"' + - name: ArabianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ArabianStandardTime:member' + package: outlook! + summary: Arabian Standard Time + value: '"Arabian Standard Time"' + - name: ArabicStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ArabicStandardTime:member' + package: outlook! + summary: Arabic Standard Time + value: '"Arabic Standard Time"' + - name: ArgentinaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ArgentinaStandardTime:member' + package: outlook! + summary: Argentina Standard Time + value: '"Argentina Standard Time"' + - name: AstrakhanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AstrakhanStandardTime:member' + package: outlook! + summary: Astrakhan Standard Time + value: '"Astrakhan Standard Time"' + - name: AtlanticStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AtlanticStandardTime:member' + package: outlook! + summary: Atlantic Standard Time + value: '"Atlantic Standard Time"' + - name: AUSCentralStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AUSCentralStandardTime:member' + package: outlook! + summary: Australia Central Standard Time + value: '"AUS Central Standard Time"' + - name: AusCentralW_StandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AusCentralW_StandardTime:member' + package: outlook! + summary: Australia Central West Standard Time + value: '"Aus Central W. Standard Time"' + - name: AUSEasternStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AUSEasternStandardTime:member' + package: outlook! + summary: AUS Eastern Standard Time + value: '"AUS Eastern Standard Time"' + - name: AzerbaijanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AzerbaijanStandardTime:member' + package: outlook! + summary: Azerbaijan Standard Time + value: '"Azerbaijan Standard Time"' + - name: AzoresStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.AzoresStandardTime:member' + package: outlook! + summary: Azores Standard Time + value: '"Azores Standard Time"' + - name: BahiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.BahiaStandardTime:member' + package: outlook! + summary: Bahia Standard Time + value: '"Bahia Standard Time"' + - name: BangladeshStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.BangladeshStandardTime:member' + package: outlook! + summary: Bangladesh Standard Time + value: '"Bangladesh Standard Time"' + - name: BelarusStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.BelarusStandardTime:member' + package: outlook! + summary: Belarus Standard Time + value: '"Belarus Standard Time"' + - name: BougainvilleStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.BougainvilleStandardTime:member' + package: outlook! + summary: Bougainville Standard Time + value: '"Bougainville Standard Time"' + - name: CanadaCentralStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CanadaCentralStandardTime:member' + package: outlook! + summary: Canada Central Standard Time + value: '"Canada Central Standard Time"' + - name: CapeVerdeStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CapeVerdeStandardTime:member' + package: outlook! + summary: Cape Verde Standard Time + value: '"Cape Verde Standard Time"' + - name: CaucasusStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CaucasusStandardTime:member' + package: outlook! + summary: Caucasus Standard Time + value: '"Caucasus Standard Time"' + - name: CenAustraliaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CenAustraliaStandardTime:member' + package: outlook! + summary: Central Australia Standard Time + value: '"Cen. Australia Standard Time"' + - name: CentralAmericaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralAmericaStandardTime:member' + package: outlook! + summary: Central America Standard Time + value: '"Central America Standard Time"' + - name: CentralAsiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralAsiaStandardTime:member' + package: outlook! + summary: Central Asia Standard Time + value: '"Central Asia Standard Time"' + - name: CentralBrazilianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralBrazilianStandardTime:member' + package: outlook! + summary: Central Brazilian Standard Time + value: '"Central Brazilian Standard Time"' + - name: CentralEuropeStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralEuropeStandardTime:member' + package: outlook! + summary: Central Europe Standard Time + value: '"Central Europe Standard Time"' + - name: CentralEuropeanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralEuropeanStandardTime:member' + package: outlook! + summary: Central European Standard Time + value: '"Central European Standard Time"' + - name: CentralPacificStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralPacificStandardTime:member' + package: outlook! + summary: Central Pacific Standard Time + value: '"Central Pacific Standard Time"' + - name: CentralStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralStandardTime:member' + package: outlook! + summary: Central Standard Time + value: '"Central Standard Time"' + - name: CentralStandardTime_Mexico + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CentralStandardTime_Mexico:member' + package: outlook! + summary: Central Standard Time (Mexico) + value: '"Central Standard Time (Mexico)"' + - name: ChathamIslandsStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ChathamIslandsStandardTime:member' + package: outlook! + summary: Chatham Islands Standard Time + value: '"Chatham Islands Standard Time"' + - name: ChinaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ChinaStandardTime:member' + package: outlook! + summary: China Standard Time + value: '"China Standard Time"' + - name: CubaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.CubaStandardTime:member' + package: outlook! + summary: Cuba Standard Time + value: '"Cuba Standard Time"' + - name: DatelineStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.DatelineStandardTime:member' + package: outlook! + summary: Dateline Standard Time + value: '"Dateline Standard Time"' + - name: E_AfricaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.E_AfricaStandardTime:member' + package: outlook! + summary: East Africa Standard Time + value: '"E. Africa Standard Time"' + - name: E_AustraliaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.E_AustraliaStandardTime:member' + package: outlook! + summary: East Australia Standard Time + value: '"E. Australia Standard Time"' + - name: E_EuropeStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.E_EuropeStandardTime:member' + package: outlook! + summary: East Europe Standard Time + value: '"E. Europe Standard Time"' + - name: E_SouthAmericaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.E_SouthAmericaStandardTime:member' + package: outlook! + summary: East South America Standard Time + value: '"E. South America Standard Time"' + - name: EasterIslandStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.EasterIslandStandardTime:member' + package: outlook! + summary: Easter Island Standard Time + value: '"Easter Island Standard Time"' + - name: EasternStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.EasternStandardTime:member' + package: outlook! + summary: Eastern Standard Time + value: '"Eastern Standard Time"' + - name: EasternStandardTime_Mexico + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.EasternStandardTime_Mexico:member' + package: outlook! + summary: Eastern Standard Time (Mexico) + value: '"Eastern Standard Time (Mexico)"' + - name: EgyptStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.EgyptStandardTime:member' + package: outlook! + summary: Egypt Standard Time + value: '"Egypt Standard Time"' + - name: EkaterinburgStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.EkaterinburgStandardTime:member' + package: outlook! + summary: Ekaterinburg Standard Time + value: '"Ekaterinburg Standard Time"' + - name: FijiStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.FijiStandardTime:member' + package: outlook! + summary: Fiji Standard Time + value: '"Fiji Standard Time"' + - name: FLEStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.FLEStandardTime:member' + package: outlook! + summary: FLE Standard Time + value: '"FLE Standard Time"' + - name: GeorgianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.GeorgianStandardTime:member' + package: outlook! + summary: Georgian Standard Time + value: '"Georgian Standard Time"' + - name: GMTStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.GMTStandardTime:member' + package: outlook! + summary: GMT Standard Time + value: '"GMT Standard Time"' + - name: GreenlandStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.GreenlandStandardTime:member' + package: outlook! + summary: Greenland Standard Time + value: '"Greenland Standard Time"' + - name: GreenwichStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.GreenwichStandardTime:member' + package: outlook! + summary: Greenwich Standard Time + value: '"Greenwich Standard Time"' + - name: GTBStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.GTBStandardTime:member' + package: outlook! + summary: GTB Standard Time + value: '"GTB Standard Time"' + - name: HaitiStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.HaitiStandardTime:member' + package: outlook! + summary: Haiti Standard Time + value: '"Haiti Standard Time"' + - name: HawaiianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.HawaiianStandardTime:member' + package: outlook! + summary: Hawaiian Standard Time + value: '"Hawaiian Standard Time"' + - name: IndiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.IndiaStandardTime:member' + package: outlook! + summary: India Standard Time + value: '"India Standard Time"' + - name: IranStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.IranStandardTime:member' + package: outlook! + summary: Iran Standard Time + value: '"Iran Standard Time"' + - name: IsraelStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.IsraelStandardTime:member' + package: outlook! + summary: Israel Standard Time + value: '"Israel Standard Time"' + - name: JordanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.JordanStandardTime:member' + package: outlook! + summary: Jordan Standard Time + value: '"Jordan Standard Time"' + - name: KaliningradStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.KaliningradStandardTime:member' + package: outlook! + summary: Kaliningrad Standard Time + value: '"Kaliningrad Standard Time"' + - name: KamchatkaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.KamchatkaStandardTime:member' + package: outlook! + summary: Kamchatka Standard Time + value: '"Kamchatka Standard Time"' + - name: KoreaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.KoreaStandardTime:member' + package: outlook! + summary: Korea Standard Time + value: '"Korea Standard Time"' + - name: LibyaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.LibyaStandardTime:member' + package: outlook! + summary: Libya Standard Time + value: '"Libya Standard Time"' + - name: LineIslandsStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.LineIslandsStandardTime:member' + package: outlook! + summary: Line Islands Standard Time + value: '"Line Islands Standard Time"' + - name: LordHoweStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.LordHoweStandardTime:member' + package: outlook! + summary: Lord Howe Standard Time + value: '"Lord Howe Standard Time"' + - name: MagadanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MagadanStandardTime:member' + package: outlook! + summary: Magadan Standard Time + value: '"Magadan Standard Time"' + - name: MagallanesStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MagallanesStandardTime:member' + package: outlook! + summary: Magallanes Standard Time + value: '"Magallanes Standard Time"' + - name: MarquesasStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MarquesasStandardTime:member' + package: outlook! + summary: Marquesas Standard Time + value: '"Marquesas Standard Time"' + - name: MauritiusStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MauritiusStandardTime:member' + package: outlook! + summary: Mauritius Standard Time + value: '"Mauritius Standard Time"' + - name: MidAtlanticStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MidAtlanticStandardTime:member' + package: outlook! + summary: Mid-Atlantic Standard Time + value: '"Mid-Atlantic Standard Time"' + - name: MiddleEastStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MiddleEastStandardTime:member' + package: outlook! + summary: Middle East Standard Time + value: '"Middle East Standard Time"' + - name: MontevideoStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MontevideoStandardTime:member' + package: outlook! + summary: Montevideo Standard Time + value: '"Montevideo Standard Time"' + - name: MoroccoStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MoroccoStandardTime:member' + package: outlook! + summary: Morocco Standard Time + value: '"Morocco Standard Time"' + - name: MountainStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MountainStandardTime:member' + package: outlook! + summary: Mountain Standard Time + value: '"Mountain Standard Time"' + - name: MountainStandardTime_Mexico + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MountainStandardTime_Mexico:member' + package: outlook! + summary: Mountain Standard Time (Mexico) + value: '"Mountain Standard Time (Mexico)"' + - name: MyanmarStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.MyanmarStandardTime:member' + package: outlook! + summary: Myanmar Standard Time + value: '"Myanmar Standard Time"' + - name: N_CentralAsiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.N_CentralAsiaStandardTime:member' + package: outlook! + summary: North Central Asia Standard Time + value: '"N. Central Asia Standard Time"' + - name: NamibiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NamibiaStandardTime:member' + package: outlook! + summary: Namibia Standard Time + value: '"Namibia Standard Time"' + - name: NepalStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NepalStandardTime:member' + package: outlook! + summary: Nepal Standard Time + value: '"Nepal Standard Time"' + - name: NewZealandStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NewZealandStandardTime:member' + package: outlook! + summary: New Zealand Standard Time + value: '"New Zealand Standard Time"' + - name: NewfoundlandStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NewfoundlandStandardTime:member' + package: outlook! + summary: Newfoundland Standard Time + value: '"Newfoundland Standard Time"' + - name: NorfolkStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NorfolkStandardTime:member' + package: outlook! + summary: Norfolk Standard Time + value: '"Norfolk Standard Time"' + - name: NorthAsiaEastStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NorthAsiaEastStandardTime:member' + package: outlook! + summary: North Asia East Standard Time + value: '"North Asia East Standard Time"' + - name: NorthAsiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NorthAsiaStandardTime:member' + package: outlook! + summary: North Asia Standard Time + value: '"North Asia Standard Time"' + - name: NorthKoreaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.NorthKoreaStandardTime:member' + package: outlook! + summary: North Korea Standard Time + value: '"North Korea Standard Time"' + - name: OmskStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.OmskStandardTime:member' + package: outlook! + summary: Omsk Standard Time + value: '"Omsk Standard Time"' + - name: PacificSAStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.PacificSAStandardTime:member' + package: outlook! + summary: Pacific SA Standard Time + value: '"Pacific SA Standard Time"' + - name: PacificStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime:member' + package: outlook! + summary: Pacific Standard Time + value: '"Pacific Standard Time"' + - name: PacificStandardTimeMexico + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTimeMexico:member' + package: outlook! + summary: Pacific Standard Time (Mexico) + value: '"Pacific Standard Time (Mexico)"' + - name: PakistanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.PakistanStandardTime:member' + package: outlook! + summary: Pakistan Standard Time + value: '"Pakistan Standard Time"' + - name: ParaguayStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.ParaguayStandardTime:member' + package: outlook! + summary: Paraguay Standard Time + value: '"Paraguay Standard Time"' + - name: RomanceStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.RomanceStandardTime:member' + package: outlook! + summary: Romance Standard Time + value: '"Romance Standard Time"' + - name: RussiaTimeZone10 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.RussiaTimeZone10:member' + package: outlook! + summary: Russia Time Zone 10 + value: '"Russia Time Zone 10"' + - name: RussiaTimeZone11 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.RussiaTimeZone11:member' + package: outlook! + summary: Russia Time Zone 11 + value: '"Russia Time Zone 11"' + - name: RussiaTimeZone3 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.RussiaTimeZone3:member' + package: outlook! + summary: Russia Time Zone 3 + value: '"Russia Time Zone 3"' + - name: RussianStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.RussianStandardTime:member' + package: outlook! + summary: Russian Standard Time + value: '"Russian Standard Time"' + - name: SAEasternStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SAEasternStandardTime:member' + package: outlook! + summary: SA Eastern Standard Time + value: '"SA Eastern Standard Time"' + - name: SAPacificStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SAPacificStandardTime:member' + package: outlook! + summary: SA Pacific Standard Time + value: '"SA Pacific Standard Time"' + - name: SAWesternStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SAWesternStandardTime:member' + package: outlook! + summary: SA Western Standard Time + value: '"SA Western Standard Time"' + - name: SaintPierreStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SaintPierreStandardTime:member' + package: outlook! + summary: Saint Pierre Standard Time + value: '"Saint Pierre Standard Time"' + - name: SakhalinStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SakhalinStandardTime:member' + package: outlook! + summary: Sakhalin Standard Time + value: '"Sakhalin Standard Time"' + - name: SamoaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SamoaStandardTime:member' + package: outlook! + summary: Samoa Standard Time + value: '"Samoa Standard Time"' + - name: SaratovStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SaratovStandardTime:member' + package: outlook! + summary: Saratov Standard Time + value: '"Saratov Standard Time"' + - name: SEAsiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SEAsiaStandardTime:member' + package: outlook! + summary: Southeast Asia Standard Time + value: '"SE Asia Standard Time"' + - name: SingaporeStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SingaporeStandardTime:member' + package: outlook! + summary: Singapore Standard Time + value: '"Singapore Standard Time"' + - name: SouthAfricaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SouthAfricaStandardTime:member' + package: outlook! + summary: South Africa Standard Time + value: '"South Africa Standard Time"' + - name: SriLankaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SriLankaStandardTime:member' + package: outlook! + summary: Sri Lanka Standard Time + value: '"Sri Lanka Standard Time"' + - name: SudanStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SudanStandardTime:member' + package: outlook! + summary: Sudan Standard Time + value: '"Sudan Standard Time"' + - name: SyriaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.SyriaStandardTime:member' + package: outlook! + summary: Syria Standard Time + value: '"Syria Standard Time"' + - name: TaipeiStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TaipeiStandardTime:member' + package: outlook! + summary: Taipei Standard Time + value: '"Taipei Standard Time"' + - name: TasmaniaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TasmaniaStandardTime:member' + package: outlook! + summary: Tasmania Standard Time + value: '"Tasmania Standard Time"' + - name: TocantinsStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TocantinsStandardTime:member' + package: outlook! + summary: Tocantins Standard Time + value: '"Tocantins Standard Time"' + - name: TokyoStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TokyoStandardTime:member' + package: outlook! + summary: Tokyo Standard Time + value: '"Tokyo Standard Time"' + - name: TomskStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TomskStandardTime:member' + package: outlook! + summary: Tomsk Standard Time + value: '"Tomsk Standard Time"' + - name: TongaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TongaStandardTime:member' + package: outlook! + summary: Tonga Standard Time + value: '"Tonga Standard Time"' + - name: TransbaikalStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TransbaikalStandardTime:member' + package: outlook! + summary: Transbaikal Standard Time + value: '"Transbaikal Standard Time"' + - name: TurkeyStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TurkeyStandardTime:member' + package: outlook! + summary: Turkey Standard Time + value: '"Turkey Standard Time"' + - name: TurksAndCaicosStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.TurksAndCaicosStandardTime:member' + package: outlook! + summary: Turks And Caicos Standard Time + value: '"Turks And Caicos Standard Time"' + - name: UlaanbaatarStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UlaanbaatarStandardTime:member' + package: outlook! + summary: Ulaanbaatar Standard Time + value: '"Ulaanbaatar Standard Time"' + - name: USEasternStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.USEasternStandardTime:member' + package: outlook! + summary: United States Eastern Standard Time + value: '"US Eastern Standard Time"' + - name: USMountainStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.USMountainStandardTime:member' + package: outlook! + summary: United States Mountain Standard Time + value: '"US Mountain Standard Time"' + - name: UTC + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTC:member' + package: outlook! + summary: Coordinated Universal Time (UTC) + value: '"UTC"' + - name: UTCPLUS12 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCPLUS12:member' + package: outlook! + summary: Coordinated Universal Time (UTC) + 12 hours + value: '"UTC+12"' + - name: UTCPLUS13 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCPLUS13:member' + package: outlook! + summary: Coordinated Universal Time (UTC) + 13 hours + value: '"UTC+13"' + - name: UTCMINUS02 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCMINUS02:member' + package: outlook! + summary: Coordinated Universal Time (UTC) - 2 hours + value: '"UTC-02"' + - name: UTCMINUS08 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCMINUS08:member' + package: outlook! + summary: Coordinated Universal Time (UTC) - 8 hours + value: '"UTC-08"' + - name: UTCMINUS09 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCMINUS09:member' + package: outlook! + summary: Coordinated Universal Time (UTC) - 9 hours + value: '"UTC-09"' + - name: UTCMINUS11 + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.UTCMINUS11:member' + package: outlook! + summary: Coordinated Universal Time (UTC) - 11 hours + value: '"UTC-11"' + - name: VenezuelaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.VenezuelaStandardTime:member' + package: outlook! + summary: Venezuela Standard Time + value: '"Venezuela Standard Time"' + - name: VladivostokStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.VladivostokStandardTime:member' + package: outlook! + summary: Vladivostok Standard Time + value: '"Vladivostok Standard Time"' + - name: W_AustraliaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.W_AustraliaStandardTime:member' + package: outlook! + summary: West Australia Standard Time + value: '"W. Australia Standard Time"' + - name: W_CentralAfricaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.W_CentralAfricaStandardTime:member' + package: outlook! + summary: West Central Africa Standard Time + value: '"W. Central Africa Standard Time"' + - name: W_EuropeStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.W_EuropeStandardTime:member' + package: outlook! + summary: West Europe Standard Time + value: '"W. Europe Standard Time"' + - name: W_MongoliaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.W_MongoliaStandardTime:member' + package: outlook! + summary: West Mongolia Standard Time + value: '"W. Mongolia Standard Time"' + - name: WestAsiaStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.WestAsiaStandardTime:member' + package: outlook! + summary: West Asia Standard Time + value: '"West Asia Standard Time"' + - name: WestBankStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.WestBankStandardTime:member' + package: outlook! + summary: West Bank Standard Time + value: '"West Bank Standard Time"' + - name: WestPacificStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.WestPacificStandardTime:member' + package: outlook! + summary: West Pacific Standard Time + value: '"West Pacific Standard Time"' + - name: YakutskStandardTime + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone.YakutskStandardTime:member' + package: outlook! + summary: Yakutsk Standard Time + value: '"Yakutsk Standard Time"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetype.yml new file mode 100644 index 0000000000..89928e0908 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.recurrencetype.yml @@ -0,0 +1,98 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.RecurrenceType +uid: 'outlook!Office.MailboxEnums.RecurrenceType:enum' +package: outlook! +fullName: Office.MailboxEnums.RecurrenceType +summary: Specifies the type of recurrence. +remarks: >- + \[ [API set: Mailbox 1.7](/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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Daily + uid: 'outlook!Office.MailboxEnums.RecurrenceType.Daily:member' + package: outlook! + summary: Daily. + value: '"daily"' + - name: Weekday + uid: 'outlook!Office.MailboxEnums.RecurrenceType.Weekday:member' + package: outlook! + summary: Weekday. + value: '"weekday"' + - name: Weekly + uid: 'outlook!Office.MailboxEnums.RecurrenceType.Weekly:member' + package: outlook! + summary: Weekly. + value: '"weekly"' + - name: Monthly + uid: 'outlook!Office.MailboxEnums.RecurrenceType.Monthly:member' + package: outlook! + summary: Monthly. + value: '"monthly"' + - name: Yearly + uid: 'outlook!Office.MailboxEnums.RecurrenceType.Yearly:member' + package: outlook! + summary: Yearly. + value: '"yearly"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.responsetype.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.responsetype.yml new file mode 100644 index 0000000000..3c8ded8210 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.responsetype.yml @@ -0,0 +1,86 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.ResponseType +uid: 'outlook!Office.MailboxEnums.ResponseType:enum' +package: outlook! +fullName: Office.MailboxEnums.ResponseType +summary: Specifies the type of response to a meeting invitation. +remarks: >- + **[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/30-recipients-and-attendees/get-all-attendees.yaml + + + function organizeByResponse(attendees) { + const accepted = []; + const declined = []; + const noResponse = []; + const tentative = []; + attendees.forEach(attendee => { + switch (attendee.appointmentResponse) { + case Office.MailboxEnums.ResponseType.Accepted: + accepted.push(attendee); + break; + case Office.MailboxEnums.ResponseType.Declined: + declined.push(attendee); + break; + case Office.MailboxEnums.ResponseType.None: + noResponse.push(attendee); + break; + case Office.MailboxEnums.ResponseType.Tentative: + tentative.push(attendee); + break; + case Office.MailboxEnums.ResponseType.Organizer: + console.log(`Organizer: ${attendee.displayName}, ${attendee.emailAddress}`); + break; + } + }); + + // List attendees by their response. + console.log("Accepted: "); + printAttendees(accepted); + console.log("Declined: "); + printAttendees(declined); + console.log("Tentative: "); + printAttendees(tentative); + console.log("No response: "); + printAttendees(noResponse); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: None + uid: 'outlook!Office.MailboxEnums.ResponseType.None:member' + package: outlook! + summary: There has been no response from the attendee. + value: '"none"' + - name: Organizer + uid: 'outlook!Office.MailboxEnums.ResponseType.Organizer:member' + package: outlook! + summary: The attendee is the meeting organizer. + value: '"organizer"' + - name: Tentative + uid: 'outlook!Office.MailboxEnums.ResponseType.Tentative:member' + package: outlook! + summary: The meeting request was tentatively accepted by the attendee. + value: '"tentative"' + - name: Accepted + uid: 'outlook!Office.MailboxEnums.ResponseType.Accepted:member' + package: outlook! + summary: The meeting request was accepted by the attendee. + value: '"accepted"' + - name: Declined + uid: 'outlook!Office.MailboxEnums.ResponseType.Declined:member' + package: outlook! + summary: The meeting request was declined by the attendee. + value: '"declined"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.restversion.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.restversion.yml new file mode 100644 index 0000000000..92d89f2e03 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.restversion.yml @@ -0,0 +1,75 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.RestVersion +uid: 'outlook!Office.MailboxEnums.RestVersion:enum' +package: outlook! +fullName: Office.MailboxEnums.RestVersion +summary: Specifies the version of the REST API that corresponds to a REST-formatted item ID. +remarks: >- + \[ [API set: Mailbox 1.3](/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 + + + **Important**: The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and + AppSource-hosted add-ins are able to use the REST service until extended support ends for Outlook 2019 on October 14, + 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also applies to new add-ins + developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you + to migrate your add-ins to use [Microsoft + Graph](https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph). For guidance, see + [Compare Microsoft Graph and Outlook REST API endpoints](https://learn.microsoft.com/outlook/rest/compare-graph). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/85-tokens-and-service-calls/ids-and-urls.yaml + + + // Get the EWS URL and EWS item ID. + + console.log("EWS URL: " + Office.context.mailbox.ewsUrl); + + const ewsId = Office.context.mailbox.item.itemId; + + console.log("EWS item ID: " + Office.context.mailbox.item.itemId); + + + // Convert the EWS item ID to a REST-formatted ID. + + const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("REST item ID: " + restId); + + + // Convert the REST-formatted ID back to an EWS-formatted ID. + + const ewsId2 = Office.context.mailbox.convertToEwsId(restId, Office.MailboxEnums.RestVersion.v2_0); + + console.log("EWS ID (from REST ID): " + ewsId2); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: v1_0 + uid: 'outlook!Office.MailboxEnums.RestVersion.v1_0:member' + package: outlook! + summary: Version 1.0. + value: '"v1.0"' + - name: v2_0 + uid: 'outlook!Office.MailboxEnums.RestVersion.v2_0:member' + package: outlook! + summary: Version 2.0. + value: '"v2.0"' + - name: Beta + uid: 'outlook!Office.MailboxEnums.RestVersion.Beta:member' + package: outlook! + summary: Beta. + value: '"beta"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.savelocation.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.savelocation.yml new file mode 100644 index 0000000000..bd4b6ad925 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.savelocation.yml @@ -0,0 +1,79 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.SaveLocation +uid: 'outlook!Office.MailboxEnums.SaveLocation:enum' +package: outlook! +fullName: Office.MailboxEnums.SaveLocation +summary: Specifies the location in which an add-in wants to save data. +remarks: >- + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose, Read + + + **Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn + more about APIs supported in Outlook on mobile devices, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Checks if the add-in can save data to SharePoint. + + const isSaveToSharePointAllowed = + Office.context.mailbox.getIsSaveToLocationAllowed(Office.MailboxEnums.SaveLocation.SharePoint); + + if (isSaveToSharePointAllowed) { + console.log("Saving to SharePoint is allowed."); + // Do something. + } else { + console.log("Saving to SharePoint isn't allowed."); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: AccountDocument + uid: 'outlook!Office.MailboxEnums.SaveLocation.AccountDocument:member' + package: outlook! + summary: A location associated with an account within an add-in. + - name: Box + uid: 'outlook!Office.MailboxEnums.SaveLocation.Box:member' + package: outlook! + summary: Box. + - name: Dropbox + uid: 'outlook!Office.MailboxEnums.SaveLocation.Dropbox:member' + package: outlook! + summary: Dropbox. + - name: GoogleDrive + uid: 'outlook!Office.MailboxEnums.SaveLocation.GoogleDrive:member' + package: outlook! + summary: Google Drive. + - name: Local + uid: 'outlook!Office.MailboxEnums.SaveLocation.Local:member' + package: outlook! + summary: Local storage on a device. + - name: OnedriveForBusiness + uid: 'outlook!Office.MailboxEnums.SaveLocation.OnedriveForBusiness:member' + package: outlook! + summary: |- + OneDrive for Business. + + **Important**: For OneDrive Personal, use OTHER. + - name: Other + uid: 'outlook!Office.MailboxEnums.SaveLocation.Other:member' + package: outlook! + summary: 'Other cloud storage providers, including OneDrive Personal.' + - name: PhotoLibrary + uid: 'outlook!Office.MailboxEnums.SaveLocation.PhotoLibrary:member' + package: outlook! + summary: The device's photo library. + - name: SharePoint + uid: 'outlook!Office.MailboxEnums.SaveLocation.SharePoint:member' + package: outlook! + summary: >- + SharePoint. Includes both SharePoint Online and SharePoint on-premises (if accessed with a Microsoft Entra ID + account). diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sendmodeoverride.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sendmodeoverride.yml new file mode 100644 index 0000000000..116eeb6602 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sendmodeoverride.yml @@ -0,0 +1,71 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.SendModeOverride +uid: 'outlook!Office.MailboxEnums.SendModeOverride:enum' +package: outlook! +fullName: Office.MailboxEnums.SendModeOverride +summary: >- + Specifies the [send mode + option](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#available-send-mode-options) + that overrides the option set in the manifest at runtime. + + + For information on how to implement a Smart Alerts add-in, see [Handle OnMessageSend and OnAppointmentSend events in + your Outlook add-in with Smart + Alerts](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events). +remarks: >- + \[ [API set: Mailbox 1.14](/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 + + + #### Examples + + + ```TypeScript + + // The following example checks whether a location is specified in an appointment before it's sent. + + function onAppointmentSendHandler(event) { + Office.context.mailbox.item.location.getAsync({ asyncContext: event }, (asyncResult) => { + const event = asyncResult.asyncContext; + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + // If the add-in is unable to retrieve the appointment's location, the appointment isn't sent. + event.completed({ allowEvent: false, errorMessage: "Failed to get the appointment's location." }); + return; + } + + if (asyncResult.value === "") { + // If no location is specified, the appointment isn't sent and the user is alerted to include a location. + event.completed( + { + allowEvent: false, + cancelLabel: "Add a location", + commandId: "msgComposeOpenPaneButton", + errorMessage: "Don't forget to add a meeting location.", + sendModeOverride: Office.MailboxEnums.SendModeOverride.PromptUser + } + ); + } else { + // If a location is specified, the appointment is sent. + event.completed({ allowEvent: true }); + } + }); + } + + ``` +isPreview: false +isDeprecated: false +fields: + - name: PromptUser + uid: 'outlook!Office.MailboxEnums.SendModeOverride.PromptUser:member' + package: outlook! + summary: >- + Provides the **Send Anyway** option in a Smart Alerts dialog when the mail item doesn't meet the conditions of + the event-based add-in. To learn more, see the [**prompt user** send mode + option](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#prompt-user). + value: '"promptUser"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sourceproperty.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sourceproperty.yml new file mode 100644 index 0000000000..6278bb5817 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.sourceproperty.yml @@ -0,0 +1,48 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.SourceProperty +uid: 'outlook!Office.MailboxEnums.SourceProperty:enum' +package: outlook! +fullName: Office.MailboxEnums.SourceProperty +summary: Specifies the source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details). +remarks: >- + \[ [API set: Mailbox 1.2](/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 + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/get-selected-data.yaml + + + Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const text = asyncResult.value.data; + const prop = asyncResult.value.sourceProperty; + console.log("Selected text in " + prop + ": " + text); + } else { + console.error(asyncResult.error); + } + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: Body + uid: 'outlook!Office.MailboxEnums.SourceProperty.Body:member' + package: outlook! + summary: The source of the data is from the body of the item. + value: '"body"' + - name: Subject + uid: 'outlook!Office.MailboxEnums.SourceProperty.Subject:member' + package: outlook! + summary: The source of the data is from the subject of the item. + value: '"subject"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.weeknumber.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.weeknumber.yml new file mode 100644 index 0000000000..75341cd9c9 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxenums.weeknumber.yml @@ -0,0 +1,98 @@ +### YamlMime:TSEnum +name: Office.MailboxEnums.WeekNumber +uid: 'outlook!Office.MailboxEnums.WeekNumber:enum' +package: outlook! +fullName: Office.MailboxEnums.WeekNumber +summary: Specifies the week of the month. +remarks: >- + \[ [API set: Mailbox 1.7](/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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` +isPreview: false +isDeprecated: false +fields: + - name: First + uid: 'outlook!Office.MailboxEnums.WeekNumber.First:member' + package: outlook! + summary: First week of the month. + value: '"first"' + - name: Second + uid: 'outlook!Office.MailboxEnums.WeekNumber.Second:member' + package: outlook! + summary: Second week of the month. + value: '"second"' + - name: Third + uid: 'outlook!Office.MailboxEnums.WeekNumber.Third:member' + package: outlook! + summary: Third week of the month. + value: '"third"' + - name: Fourth + uid: 'outlook!Office.MailboxEnums.WeekNumber.Fourth:member' + package: outlook! + summary: Fourth week of the month. + value: '"fourth"' + - name: Last + uid: 'outlook!Office.MailboxEnums.WeekNumber.Last:member' + package: outlook! + summary: Last week of the month. + value: '"last"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxevent.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxevent.yml new file mode 100644 index 0000000000..1a3e4dd7be --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mailboxevent.yml @@ -0,0 +1,104 @@ +### YamlMime:TSType +name: Office.MailboxEvent +uid: 'outlook!Office.MailboxEvent:interface' +package: outlook! +fullName: Office.MailboxEvent +summary: >- + The `MailboxEvent` object is passed as an argument to the event handler of an add-in that implements [event-based + activation](https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch), including [Smart + Alerts](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events), or the + [integrated spam-reporting feature](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting). It + allows the add-in to signify to the Outlook client that it has completed processing an event. +remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + **Important**: Support for the integrated spam-reporting feature was introduced in Mailbox 1.14. +isPreview: false +isDeprecated: false +type: interface +methods: + - name: completed(options) + uid: 'outlook!Office.MailboxEvent#completed:member(1)' + package: outlook! + fullName: completed(options) + summary: Indicates that the event-based or spam-reporting add-in has completed processing an event. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - Support for the integrated spam-reporting feature was introduced in Mailbox 1.14. + + + - Support to assign a `SmartAlertsEventCompletedOptions` object to the `options` parameter was introduced in + Mailbox 1.12. + + + #### Examples + + + ```TypeScript + + // The following example sets the subject when a new message is composed. + + function onNewMessageComposeHandler(event) { + const subject = "Set by an event-based add-in!"; + Office.context.mailbox.item.subject.setAsync( + subject, + { + asyncContext: event, + }, + (asyncResult) => { + const event = asyncResult.asyncContext; + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to set subject: " + asyncResult.error.message); + event.completed(); + return; + } + + // Signal to the Outlook client that the event has been processed. + console.log("Successfully set the subject."); + event.completed(); + } + ); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions): void;' + parameters: + - id: options + description: >- + Optional. An object that specifies the behavior of an event-based or spam-reporting add-in when it completes + processing an event. + type: >- + | + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.mastercategories.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mastercategories.yml new file mode 100644 index 0000000000..6d28c33d49 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.mastercategories.yml @@ -0,0 +1,362 @@ +### YamlMime:TSType +name: Office.MasterCategories +uid: 'outlook!Office.MasterCategories:interface' +package: outlook! +fullName: Office.MasterCategories +summary: >- + Represents the categories master list on the mailbox. + + + In Outlook, a user can tag messages and appointments by using a category to color-code them. The user defines + categories in a master list on their mailbox. They can then apply one or more categories to an item. + + + **Important**: In delegate or shared scenarios, the delegate can get the categories in the master list but can't + add or remove categories. +remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'addAsync(categories, options, callback)' + uid: 'outlook!Office.MasterCategories#addAsync:member(1)' + package: outlook! + fullName: 'addAsync(categories, options, callback)' + summary: >- + Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can + use the same color. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `DuplicateCategory`: One of the categories provided is already in the master category list. + + + - `PermissionDenied`: The user does not have permission to perform this action. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-master-categories.yaml + + + const masterCategoriesToAdd = [ + { + displayName: "TestCategory", + color: Office.MailboxEnums.CategoryColor.Preset0 + } + ]; + + + Office.context.mailbox.masterCategories.addAsync(masterCategoriesToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully added categories to master list"); + } else { + console.log("masterCategories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(categories: CategoryDetails[], options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: categories + description: The categories to be added to the master list on the mailbox. + type: '[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addAsync(categories, callback)' + uid: 'outlook!Office.MasterCategories#addAsync:member(2)' + package: outlook! + fullName: 'addAsync(categories, callback)' + summary: >- + Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can + use the same color. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `DuplicateCategory`: One of the categories provided is already in the master category list. + + + - `PermissionDenied`: The user does not have permission to perform this action. + isPreview: false + isDeprecated: false + syntax: + content: 'addAsync(categories: CategoryDetails[], callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: categories + description: The categories to be added to the master list on the mailbox. + type: '[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.MasterCategories#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets the master list of categories on a mailbox. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. If adding categories fails, the `asyncResult.error` property will + contain an error code. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.MasterCategories#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets the master list of categories on a mailbox. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[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/45-categories/work-with-master-categories.yaml + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Master categories:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories in the master list."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'removeAsync(categories, options, callback)' + uid: 'outlook!Office.MasterCategories#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(categories, options, callback)' + summary: Removes categories from the master list on a mailbox. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `PermissionDenied`: The user does not have permission to perform this action. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-master-categories.yaml + + + const masterCategoriesToRemove = ["TestCategory"]; + + + Office.context.mailbox.masterCategories.removeAsync(masterCategoriesToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Successfully removed categories from master list"); + } else { + console.log("masterCategories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(categories: string[], options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: categories + description: The categories to be removed from the master list on the mailbox. + type: 'string[]' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(categories, callback)' + uid: 'outlook!Office.MasterCategories#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(categories, callback)' + summary: Removes categories from the master list on a mailbox. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Errors**: + + + - `PermissionDenied`: The user does not have permission to perform this action. + isPreview: false + isDeprecated: false + syntax: + content: 'removeAsync(categories: string[], callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: categories + description: The categories to be removed from the master list on the mailbox. + type: 'string[]' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.meetingsuggestion.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.meetingsuggestion.yml new file mode 100644 index 0000000000..b53b79adc8 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.meetingsuggestion.yml @@ -0,0 +1,194 @@ +### YamlMime:TSType +name: Office.MeetingSuggestion +uid: 'outlook!Office.MeetingSuggestion:interface' +package: outlook! +fullName: Office.MeetingSuggestion +summary: >- + Represents a suggested meeting found in an item. Read mode only. + + + The list of meetings suggested in an email message is returned in the `meetingSuggestions` property of the `Entities` + object that's returned when the `getEntities` or `getEntitiesByType` method is called on the active item. + + + The start and end values are string representations of a `Date` object that contains the date and time at which the + suggested meeting is to begin and end. The values are in the default time zone specified for the current user. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + #### Examples + + + ```TypeScript + + const item = Office.context.mailbox.item; + + // Get an array of strings that represent meeting suggestions in the current item's body. + + const meetingSuggestions = item.getEntitiesByType(Office.MailboxEnums.EntityType.MeetingSuggestion); + + console.log("There are " + meetingSuggestions.length + " meeting suggestions.") + + meetingSuggestions.forEach(function (meetingSuggestion) { + console.log("Subject: " + JSON.stringify(meetingSuggestion.subject)); + console.log("Attendees: " + JSON.stringify(meetingSuggestion.attendees)); + console.log("Location: " + JSON.stringify(meetingSuggestion.location)); + console.log("Start: " + JSON.stringify(meetingSuggestion.start)); + console.log("End: " + JSON.stringify(meetingSuggestion.end)); + console.log("Meeting: " + JSON.stringify(meetingSuggestion.meetingString)); + }); + + ``` +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +type: interface +properties: + - name: attendees + uid: 'outlook!Office.MeetingSuggestion#attendees:member' + package: outlook! + fullName: attendees + summary: >- + Gets the attendees for a suggested meeting. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'attendees: EmailUser[];' + return: + type: '[]' + - name: end + uid: 'outlook!Office.MeetingSuggestion#end:member' + package: outlook! + fullName: end + summary: >- + Gets the date and time that a suggested meeting is to end. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'end: string;' + return: + type: string + - name: location + uid: 'outlook!Office.MeetingSuggestion#location:member' + package: outlook! + fullName: location + summary: >- + Gets the location of a suggested meeting. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'location: string;' + return: + type: string + - name: meetingString + uid: 'outlook!Office.MeetingSuggestion#meetingString:member' + package: outlook! + fullName: meetingString + summary: >- + Gets a string that was identified as a meeting suggestion. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'meetingString: string;' + return: + type: string + - name: start + uid: 'outlook!Office.MeetingSuggestion#start:member' + package: outlook! + fullName: start + summary: >- + Gets the date and time that a suggested meeting is to begin. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'start: string;' + return: + type: string + - name: subject + uid: 'outlook!Office.MeetingSuggestion#subject:member' + package: outlook! + fullName: subject + summary: >- + Gets the subject of a suggested meeting. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'subject: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.message.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.message.yml new file mode 100644 index 0000000000..6ece7a47f6 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.message.yml @@ -0,0 +1,27 @@ +### YamlMime:TSType +name: Office.Message +uid: 'outlook!Office.Message:interface' +package: outlook! +fullName: Office.Message +summary: >- + A subclass of [Item](xref:outlook!Office.Item:interface) for messages. + + + **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. You should + treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + Child interfaces: + + + - [MessageCompose](xref:outlook!Office.MessageCompose:interface) + + + - [MessageRead](xref:outlook!Office.MessageRead:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.messagecompose.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.messagecompose.yml new file mode 100644 index 0000000000..9a99d05931 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.messagecompose.yml @@ -0,0 +1,4120 @@ +### YamlMime:TSType +name: Office.MessageCompose +uid: 'outlook!Office.MessageCompose:interface' +package: outlook! +fullName: Office.MessageCompose +summary: >- + The message compose mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: + + + - This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a + mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be + turned on. For guidance on how to configure the Reading Pane, see [Use and configure the Reading Pane to preview + messages](https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0). + + + Parent interfaces: + + + - [ItemCompose](xref:outlook!Office.ItemCompose:interface) + + + - [Message](xref:outlook!Office.Message:interface) +remarks: '' +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bcc + uid: 'outlook!Office.MessageCompose#bcc:member' + package: outlook! + fullName: bcc + summary: >- + Gets an object that provides methods to get or update the recipients on the **Bcc** (blind carbon copy) line + of a message. + + + Depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients you can get + or update. See the [Recipients](xref:outlook!Office.Recipients:interface) object for more details. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.bcc.setAsync( ['alice@contoso.com', 'bob@contoso.com'] ); + + Office.context.mailbox.item.bcc.addAsync( ['jason@contoso.com'] ); + + Office.context.mailbox.item.bcc.getAsync(callback); + + + function callback(asyncResult) { + const arrayOfBccRecipients = asyncResult.value; + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-bcc-message-compose.yaml + + + Office.context.mailbox.item.bcc.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgBcc = asyncResult.value; + console.log("Message being blind-copied to:"); + for (let i = 0; i < msgBcc.length; i++) { + console.log(msgBcc[i].displayName + " (" + msgBcc[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailBcc") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.bcc.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting Bcc field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'bcc: Recipients;' + return: + type: '' + - name: body + uid: 'outlook!Office.MessageCompose#body:member' + package: outlook! + fullName: body + summary: Gets an object that provides methods for manipulating the body of an item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // This example gets the body of the item as plain text. + + Office.context.mailbox.item.body.getAsync( + "text", + { asyncContext: "This is passed to the callback" }, + function callback(result) { + // Do something with the result. + }); + + // The following is an example of the result parameter passed to the callback function. + + { + "value": "TEXT of whole body (including threads below)", + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.MessageCompose#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods for managing the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can't use the API + to manage categories on a message in Compose mode. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Categories assigned to this item:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + // Note: In order for you to successfully add a category, + + // it must be in the mailbox categories master list. + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const masterCategories = asyncResult.value; + if (masterCategories && masterCategories.length > 0) { + // Grab the first category from the master list. + const categoryToAdd = [masterCategories[0].displayName]; + Office.context.mailbox.item.categories.addAsync(categoryToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully assigned category '${categoryToAdd}' to item.`); + } else { + console.log("categories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories in the master list on this mailbox. You can add categories using Office.context.mailbox.masterCategories.addAsync."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + // Grab the first category assigned to this item. + const categoryToRemove = [categories[0].displayName]; + Office.context.mailbox.item.categories.removeAsync(categoryToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully unassigned category '${categoryToRemove}' from this item.`); + } else { + console.log("categories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: cc + uid: 'outlook!Office.MessageCompose#cc:member' + package: outlook! + fullName: cc + summary: >- + Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on + the mode of the current item. + + + The `cc` property returns a `Recipients` object that provides methods to get or update the recipients on the + **Cc** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may + apply on how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) + object for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.cc.setAsync( ['alice@contoso.com', 'bob@contoso.com'] ); + + Office.context.mailbox.item.cc.addAsync( ['jason@contoso.com'] ); + + Office.context.mailbox.item.cc.getAsync(callback); + + + function callback(asyncResult) { + const arrayOfCcRecipients = asyncResult.value; + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-cc-message-compose.yaml + + + Office.context.mailbox.item.cc.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgCc = asyncResult.value; + console.log("Message being copied to:"); + for (let i = 0; i < msgCc.length; i++) { + console.log(msgCc[i].displayName + " (" + msgCc[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailCc") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.cc.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting Cc field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'cc: Recipients;' + return: + type: '' + - name: conversationId + uid: 'outlook!Office.MessageCompose#conversationId:member' + package: outlook! + fullName: conversationId + summary: >- + Gets an identifier for the email conversation that contains a particular message. + + + You can get an integer for this property if your mail app is activated in read forms or responses in compose + forms. If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation + ID for that message will change and that value you obtained earlier will no longer apply. + + + You get null for this property for a new item in a compose form. If the user sets a subject and saves the item, + the `conversationId` property will return a value. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-conversation-id-message.yaml + + + console.log(`Conversation ID: ${Office.context.mailbox.item.conversationId}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'conversationId: string;' + return: + type: string + - name: delayDeliveryTime + uid: 'outlook!Office.MessageCompose#delayDeliveryTime:member' + package: outlook! + fullName: delayDeliveryTime + summary: >- + Gets or sets the delayed delivery date and time of a message. + + + The `delayDeliveryTime` property returns a `DelayDeliveryTime` object that provides methods to manage the delivery + date and time of the message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/delay-message-delivery.yaml + + + function setDeliveryDate(minutes) { + // This snippet sets the delivery date and time of a message. + const currentTime = new Date().getTime(); + const milliseconds = totalDelay * 60000; + const timeDelay = new Date(currentTime + milliseconds); + Office.context.mailbox.item.delayDeliveryTime.setAsync(timeDelay, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + if (minutes === 1440) { + console.log(`Delayed delivery by an additional one day.`); + } else { + console.log(`Delayed delivery by an additional ${minutes} minutes.`); + } + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'delayDeliveryTime: DelayDeliveryTime;' + return: + type: '' + - name: from + uid: 'outlook!Office.MessageCompose#from:member' + package: outlook! + fullName: from + summary: |- + Gets the email address of the sender of a message. + + The `from` property returns a `From` object that provides a method to get the from value. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: This property is supported in Outlook on Android and on iOS. For a sample scenario, see + [Implement event-based activation in Outlook mobile + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-from-message-compose.yaml + + + Office.context.mailbox.item.from.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgFrom = asyncResult.value; + console.log("Message from: " + msgFrom.displayName + " (" + msgFrom.emailAddress + ")"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'from: From;' + return: + type: '' + - name: inReplyTo + uid: 'outlook!Office.MessageCompose#inReplyTo:member' + package: outlook! + fullName: inReplyTo + summary: Gets the message ID of the original message being replied to by the current message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the + user, such as changing the subject in a reply. + + + - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's + also the meeting organizer. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-in-reply-to.yaml + + + // This snippet gets the ID of the message being replied to by the current message (PR_IN_REPLY_TO_ID). + + // The API call is supported on messages being composed and isn't supported on read items. + + const inReplyTo = Office.context.mailbox.item.inReplyTo; + + if (inReplyTo) { + console.log("ID of the message being replied to: " + inReplyTo); + } else { + console.log("No InReplyTo property available for this message"); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'inReplyTo: string;' + return: + type: string + - name: internetHeaders + uid: 'outlook!Office.MessageCompose#internetHeaders:member' + package: outlook! + fullName: internetHeaders + summary: >- + Gets or sets the custom internet headers of a message. + + + The `internetHeaders` property returns an `InternetHeaders` object that provides methods to manage the internet + headers on the message. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version + 4.2405.0. To learn more about features supported in Outlook on mobile devices, see [Outlook JavaScript APIs + supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/70-mime-headers/manage-custom-internet-headers-message-compose.yaml + + + Office.context.mailbox.item.internetHeaders.getAsync( + ["preferred-fruit", "preferred-vegetable", "best-vegetable", "nonexistent-header"], + function (asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Selected headers: " + JSON.stringify(asyncResult.value)); + } else { + console.log("Error getting selected headers: " + JSON.stringify(asyncResult.error)); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'internetHeaders: InternetHeaders;' + return: + type: '' + - name: itemType + uid: 'outlook!Office.MessageCompose#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: notificationMessages + uid: 'outlook!Office.MessageCompose#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds a progress indicator to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, + message: "Progress indicator with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an informational notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Non-persistent informational notification message with id = " + id, + icon: "icon1", + persistent: false + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds a persistent information notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Persistent informational notification message with id = " + id, + icon: "icon1", + persistent: true + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + + ... + + + // Replaces a notification message of a given key with another message. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.replaceAsync( + id, + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Notification message with id = " + id + " has been replaced with an informational message.", + icon: "icon2", + persistent: false + }, + handleResult); + + ... + + + // Removes a notification message from the current mail item. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.removeAsync(id, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: sensitivityLabel + uid: 'outlook!Office.MessageCompose#sensitivityLabel:member' + package: outlook! + fullName: sensitivityLabel + summary: >- + Gets the object to get or set the [sensitivity label](xref:outlook!Office.SensitivityLabel:interface) of a + message. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-label.yaml + + + // This snippet gets the current mail item's sensitivity label. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.mailbox.item.sensitivityLabel.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(asyncResult.value); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sensitivityLabel: SensitivityLabel;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.MessageCompose#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac, the + `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + However, in Outlook on Android and on iOS, the seriesId returns the REST ID of the parent item. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services + item identifier. The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. For more details, see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series + items, or meeting requests and returns `undefined` for any other items that are not meeting requests. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-series-id.yaml + + + const seriesId = Office.context.mailbox.item.seriesId; + + + if (seriesId === undefined) { + console.log("This is a message that's not a meeting request."); + } else if (seriesId === null) { + console.log("This is a single appointment, a parent series, or a meeting request for a series or single meeting."); + } else { + console.log("This is an instance belonging to series with ID " + seriesId); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: sessionData + uid: 'outlook!Office.MessageCompose#sessionData:member' + package: outlook! + fullName: sessionData + summary: |- + Manages the [SessionData](xref:outlook!Office.SessionData:interface) of an item in Compose mode. + + **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.getAllAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("The sessionData is " + JSON.stringify(asyncResult.value)); + } else { + console.log("Failed to get all sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sessionData: SessionData;' + return: + type: '' + - name: subject + uid: 'outlook!Office.MessageCompose#subject:member' + package: outlook! + fullName: subject + summary: |- + Gets or sets the description that appears in the subject field of an item. + + The `subject` property gets or sets the entire subject of the item, as sent by the email server. + + The `subject` property returns a `Subject` object that provides methods to get and set the subject. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-subject-compose.yaml + + + Office.context.mailbox.item.subject.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Subject: ${result.value}`); + }); + + + ... + + + let subject = "Hello World!"; + + Office.context.mailbox.item.subject.setAsync(subject, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set subject to ${subject}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'subject: Subject;' + return: + type: '' + - name: to + uid: 'outlook!Office.MessageCompose#to:member' + package: outlook! + fullName: to + summary: >- + Provides access to the recipients on the **To** line of a message. The type of object and level of access + depend on the mode of the current item. + + + The `to` property returns a `Recipients` object that provides methods to get or update the recipients on the + **To** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may + apply on how many recipients you can get or update. See the [Recipients](xref:outlook!Office.Recipients:interface) + object for more details. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.to.setAsync( ['alice@contoso.com', 'bob@contoso.com'] ); + + Office.context.mailbox.item.to.addAsync( ['jason@contoso.com'] ); + + Office.context.mailbox.item.to.getAsync(callback); + + + function callback(asyncResult) { + const arrayOfToRecipients = asyncResult.value; + } + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-to-message-compose.yaml + + + Office.context.mailbox.item.to.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgTo = asyncResult.value; + console.log("Message being sent to:"); + for (let i = 0; i < msgTo.length; i++) { + console.log(msgTo[i].displayName + " (" + msgTo[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailTo") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.to.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting To field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'to: Recipients;' + return: + type: '' +methods: + - name: 'addFileAttachmentAsync(uri, attachmentName, options, callback)' + uid: 'outlook!Office.MessageCompose#addFileAttachmentAsync:member(1)' + package: outlook! + fullName: 'addFileAttachmentAsync(uri, attachmentName, options, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the + compose form. + remarks: >- + \[ [API set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new + Outlook on Windows](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: + Bearer` header to this action (whether using this API or the Outlook UI). To work around this issue, use the + `addFileAttachmentFromBase64` API introduced with requirement set 1.8. + + + - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't + return a `Cache-Control` header that specifies `no-cache`, `no-store`, or similar options in the + HTTP response. However, when you're developing the add-in and making changes to files, caching can prevent you + from seeing your changes. We recommend using `Cache-Control` headers during development. + + + - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + const attachmentUrl = $("#attachmentUrl") + .val() + .toString(); + Office.context.mailbox.item.addFileAttachmentAsync( + attachmentUrl, + getFileName(attachmentUrl), + { isInline: false }, + (result) => { + console.log(result); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentAsync(uri: string, attachmentName: string, options: Office.AsyncContextOptions & { isInline: + boolean }, callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: uri + description: >- + The URI that provides the location of the file to attach to the message or appointment. The maximum length + is 2048 characters. + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `isInline`: If true, indicates + that the attachment will be shown inline as an image in the message body and won't be displayed in the + attachment list. + type: ' & { isInline: boolean }' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentAsync(uri, attachmentName, callback)' + uid: 'outlook!Office.MessageCompose#addFileAttachmentAsync:member(2)' + package: outlook! + fullName: 'addFileAttachmentAsync(uri, attachmentName, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the + compose form. + remarks: >- + \[ [API set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new + Outlook on Windows](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: + Bearer` header to this action (whether using this API or the Outlook UI). To work around this issue, use the + `addFileAttachmentFromBase64` API introduced with requirement set 1.8. + + + - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't + return a `Cache-Control` header that specifies `no-cache`, `no-store`, or similar options in the + HTTP response. However, when you're developing the add-in and making changes to files, caching can prevent you + from seeing your changes. We recommend using `Cache-Control` headers during development. + + + - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: uri + description: >- + The URI that provides the location of the file to attach to the message or appointment. The maximum length + is 2048 characters. + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain + an `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentFromBase64Async(base64File, attachmentName, options, callback)' + uid: 'outlook!Office.MessageCompose#addFileAttachmentFromBase64Async:member(1)' + package: outlook! + fullName: 'addFileAttachmentFromBase64Async(base64File, attachmentName, options, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the + item in the compose form. This method returns the attachment identifier in the `asyncResult.value` object. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For + more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL + prefix, then send the rest of the string to this API. For example, if the full string is represented by + `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + + + - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first + get the current item body using the + [Office.context.mailbox.item.body.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1)) + method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't + render in the body once it's inserted. For further guidance, see [Attach a + file](https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file). + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + const base64String = + "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsSAAALEgHS3X78AAACRUlEQVRYw82XzXHbMBCFP2F8tzsQc8Ixyh0zoiuIXIGdCsxUYKqC0B04FdiuwMoM7mGOOIXqQGoAymXhgSX+itJM9kIRFLAP+3YXD5Pdbscx5oxaAIW8Ztr6l2PWmQwF4IyaieP53qdfAqQ8CwBn1JU4vpWhrbxXQA5MZfynANmcDIAzKgcy4FKGXsVJFf3nLgKyBQptfT4KQMRz2N0fcbxqmRMDWXflx0VPnrdArq0vekQ1Dv0UeHZGNebHhwjU8AzwKM43RyZnbAf58Q6ghudeWd0Aus0+5EcMIIRi3beua0D3Nm39BEAx3i7HTK4DEBJn5YxKOnaRA5+ErpMBWMpzDvx1RuXCcxOISlufAjfC7zgAsqsvUvMAD0ApPaEtGi9AIlUzKgJo60tt/SyKRkzLrAXERluf7W1gOICWaMyB386oooOWsIHvXbSoHuUSFovtHqicUVnH3EJoeT0aQEf5/XBGlc6otIOWBXAtPeZkAIJ9Bt6cUU9tZautX2nrk3MACHYr1ZKProKRtDw4o8pzAPjWo+NtpXTTvoteDDg8noDAcwbcRedAkGdFXyk2GEDcegVAFp2gyVDHjRQ4o6q2smoqtR5Hd+qMqtoALCWUUymr1m43QMZfOaMK4C0SrMsDANJ2E5FNcbdbjHC+ENl+H0myJFbLtaq4Rt8dyPBYRQV1E40nMv9rl7xrOw3DGb+Whcqu3i/OM6CUOWvgRlufNmnLYy4m77uJI7AXtdNcTDrU71LEyv7v01/N/ovL6bmu5/8A1tNWZldH0W4AAAAASUVORK5CYII="; + Office.context.mailbox.item.addFileAttachmentFromBase64Async( + base64String, + "logo.png", + { isInline: false }, + (result) => { + console.log(result); + } + ); + + + ... + + + // Set the signature for the current item with inline image. + + const modIcon1Base64 = + "iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDRDMxMDg1MjBCNDZFMTExODE2MkM1RUI2M0M4MDYxRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMTUxQjgyRjQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMTUxQjgyRTQ2MEQxMUUxODlFMkQwNTYzQ0YwMTUxMiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgV2luZG93cyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQxMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkNEMzEwODUyMEI0NkUxMTE4MTYyQzVFQjYzQzgwNjFEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+uC/WfAAAAehJREFUeNpilCzfwEAEkAbiECA2A2J1IOaHin8E4ptAfBaIVwLxU0IGMRKw0B6IW4DYhoE4cASIK6E0VsCEQ1wUiNcB8QESLGOAqj0MxBuhZhBloS4QnwHiQAbygR/UDF1CFupCXSjHQDmQg5qli8tCUBBsQUoQ1AD8UDNFsVk4n0o+w+bT+egWglKjNymmeGhLkqLcG2oHAwtUoIuQDj5OVgZPLUmwRe5aEmAxqYqNpFgKssOcCeplM0KqdST5GfpDDRm0JfkYrj3/SE7QguyQY4ImYYLgCtAS10kHGMw6dzNsv/qC7OwCClJXYlR++v6b4er3j5QmIFcmaNlIL6AOslCIjhYKMTHQGTBBqxh6gXcgC6/R0cKbIAv30dHCfaAKGJTxHxJSqS3Fz9DkowNmywpyMcgA8fF7b8D8VWcfM6w8+4gYC+VB+RCk8hSh0gaUD4/dewvlvUWRe/z+GzGWgex4BGtiOAHxXhoHpzMoSGHZAhSPW2lo2VZYWkHOh4nEtLrIAE+hZmNUwK+B2BOIv1PRsu9QM1/jatNcBtVZ0IREKXgENesyoVYbzNIdFFi2A5tl+NqlL6BB4QBNzsSCU1A9nlAzMAALAQMOQl0qB23qWwKxIlIrDBQ394H4OBCvISYqAAIMACVibHDqsO7zAAAAAElFTkSuQmCC"; + + Office.context.mailbox.item.addFileAttachmentFromBase64Async( + modIcon1Base64, + "myImage.png", + { isInline: true }, + function(result) { + if (result.status == Office.AsyncResultStatus.Succeeded) { + const signature = $("#signature").val() + ""; + console.log(`Setting signature to "${signature}".`); + Office.context.mailbox.item.body.setSignatureAsync( + signature, + { coercionType: "html" }, + function(asyncResult) { + console.log(`setSignatureAsync: ${asyncResult.status}`); + } + ); + } else { + console.error(`addFileAttachmentFromBase64Async: ${result.error}`); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: + Office.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: base64File + description: >- + The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the + encoded string is 27,892,122 characters (about 25 MB). + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `isInline`: If true, indicates + that the attachment will be shown inline as an image in the message body and won't be displayed in the + attachment list. + type: ' & { isInline: boolean }' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. On success, the attachment identifier will be provided in the + `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addFileAttachmentFromBase64Async(base64File, attachmentName, callback)' + uid: 'outlook!Office.MessageCompose#addFileAttachmentFromBase64Async:member(2)' + package: outlook! + fullName: 'addFileAttachmentFromBase64Async(base64File, attachmentName, callback)' + summary: >- + Adds a file to a message or appointment as an attachment. + + + The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the + item in the compose form. This method returns the attachment identifier in the `asyncResult.value` object. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For + more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL + prefix, then send the rest of the string to this API. For example, if the full string is represented by + `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + + + - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first + get the current item body using the + [Office.context.mailbox.item.body.getAsync](https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1)) + method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't + render in the body once it's inserted. For further guidance, see [Attach a + file](https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file). + + + **Errors**: + + + - `AttachmentSizeExceeded`: The attachment is larger than allowed. + + + - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + isPreview: false + isDeprecated: false + syntax: + content: >- + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: base64File + description: >- + The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the + encoded string is 27,892,122 characters (about 25 MB). + type: string + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type Office.AsyncResult. On success, the attachment identifier will be provided in the + `asyncResult.value` property. If uploading the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, options, callback)' + uid: 'outlook!Office.MessageCompose#addHandlerAsync:member(1)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, options, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + function myHandlerFunction(eventarg) { + if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = eventarg.attachmentDetails; + console.log("Event Fired and Attachment Added!"); + getAttachmentContentAsync(attachment.id, options, callback); + } + } + + + Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, callback)' + uid: 'outlook!Office.MessageCompose#addHandlerAsync:member(2)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addItemAttachmentAsync(itemId, attachmentName, options, callback)' + uid: 'outlook!Office.MessageCompose#addItemAttachmentAsync:member(1)' + package: outlook! + fullName: 'addItemAttachmentAsync(itemId, attachmentName, options, callback)' + summary: >- + Adds an Exchange item, such as a message, as an attachment to the message or appointment. + + + The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the + compose form. If you specify a callback function, the method is called with one parameter, `asyncResult`, + which contains either the attachment identifier or a code that indicates any error that occurred while attaching + the item. You can use the options parameter to pass state information to the callback function, if needed. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + If your Office Add-in is running in Outlook on the web or [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `addItemAttachmentAsync` method can attach items to items other than the item that you are editing. However, this + isn't supported and isn't recommended. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + + + #### Examples + + + ```TypeScript + + // The following example adds an existing Outlook item as an attachment + + // with the name "My Attachment". + + function addAttachment() { + // EWS ID of item to attach (shortened for readability). + const itemId = "AAMkADI1...AAA="; + + // The values in asyncContext can be accessed in the callback. + const options = { asyncContext: { var1: 1, var2: 2 } }; + + Office.context.mailbox.item.addItemAttachmentAsync(itemId, "My Attachment", options, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to add attachment: " + result.error.message); + return; + } + + console.log("Attachment added successfully."); + console.log("var1: " + result.asyncContext.var1); + console.log("var2: " + result.asyncContext.var2); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addItemAttachmentAsync(itemId: any, attachmentName: string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange identifier of the item to attach. The maximum length is 100 characters. + type: any + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If adding the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'addItemAttachmentAsync(itemId, attachmentName, callback)' + uid: 'outlook!Office.MessageCompose#addItemAttachmentAsync:member(2)' + package: outlook! + fullName: 'addItemAttachmentAsync(itemId, attachmentName, callback)' + summary: >- + Adds an Exchange item, such as a message, as an attachment to the message or appointment. + + + The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the + compose form. If you specify a callback function, the method is called with one parameter, `asyncResult`, + which contains either the attachment identifier or a code that indicates any error that occurred while attaching + the item. You can use the options parameter to pass state information to the callback function, if needed. + + + You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the + same session. + + + If your Office Add-in is running in Outlook on the web or [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `addItemAttachmentAsync` method can attach items to items other than the item that you are editing. However, this + isn't supported and isn't recommended. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + isPreview: false + isDeprecated: false + syntax: + content: >- + addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: itemId + description: The Exchange identifier of the item to attach. The maximum length is 100 characters. + type: any + - id: attachmentName + description: >- + The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 + characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. On success, the attachment identifier will be provided in + the `asyncResult.value` property. If adding the attachment fails, the `asyncResult` object will contain an + `Error` object that provides a description of the error. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: close() + uid: 'outlook!Office.MessageCompose#close:member(1)' + package: outlook! + fullName: close() + summary: >- + Closes the current item that is being composed. + + + The behavior of the `close` method depends on the current state of the item being composed. If the item has + unsaved changes, the client prompts the user to save, discard, or close the action. + + + In Outlook on Windows (classic) and on Mac, the `close` method has no effect on a reply in the Reading Pane. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), if the item is an + appointment and it has previously been saved using `saveAsync`, the user is prompted to save, discard, or + cancel even if no changes have occurred since the item was last saved. + + + **Tip**: Use the + [closeAsync](https://learn.microsoft.com/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-closeasync-member(1)) + method instead of the `close` method if you want your add-in to: + + + - Automatically discard a message being composed without prompting the user with the save dialog. + + + - Determine when a user cancels the save item dialog on a message being composed. + + + - Close a reply in the Reading Pane or an existing draft. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/25-item-save-and-close/close.yaml + + + Office.context.mailbox.item.close(); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'close(): void;' + return: + type: void + description: '' + - name: 'closeAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#closeAsync:member(1)' + package: outlook! + fullName: 'closeAsync(options, callback)' + summary: >- + Closes the current message being composed with the option to discard unsaved changes. The message being composed + can be a new message, reply, or an existing draft. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog and the + `discardItem` property isn't defined or is set to `false`. + + + - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane + or an existing draft and the `discardItem` property isn't defined or is set to `false`. + isPreview: false + isDeprecated: false + syntax: + content: >- + closeAsync(options: Office.AsyncContextOptions & { discardItem: boolean }, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `discardItem`: If `true`, the current message being composed is closed and unsaved changes are discarded. When the parameter + isn't declared or is set to `false`, a save dialog appears prompting the user to save a draft, + discard changes, or cancel the operation. This behavior occurs for new messages and replies popped out from + the Reading Pane. If you want to close a reply in the Reading Pane or an existing draft, you must set + `discardItem` to `true`. Otherwise, the call will return an error. For more information on the + error, see the Remarks section. + type: ' & { discardItem: boolean }' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: closeAsync(callback) + uid: 'outlook!Office.MessageCompose#closeAsync:member(2)' + package: outlook! + fullName: closeAsync(callback) + summary: >- + Closes the current new message being composed. + + + The behavior on a new message being composed depends on whether the message contains any unsaved changes. If no + changes have been made, the message is closed without a save dialog. On the other hand, if the message contains + unsaved changes, a save dialog appears prompting the user to save a draft, discard changes, or cancel the + operation. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog. + + + - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane + or an existing draft. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/25-item-save-and-close/close-async.yaml + + + // This snippet closes the current message being composed and discards any unsaved changes when the optional + property, discardItem, is set to true. + + // The API call works on a new message being composed, a reply, or an existing draft. + + // When discardItem is set to false or isn't defined on a new message with unsaved changes, the user is prompted + to save a draft, discard the changes, or cancel the close operation. + + Office.context.mailbox.item.closeAsync( + { discardItem: true }, + (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + }); + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'closeAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'disableClientSignatureAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#disableClientSignatureAsync:member(1)' + package: outlook! + fullName: 'disableClientSignatureAsync(options, callback)' + summary: >- + Disables the Outlook client signature. + + + The behavior of this method depends on which client the add-in is running. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the signature option + for new mails, replies, and forwards is disabled. A signature that's selected is also disabled by the method. + + + - In Outlook on Windows (classic) and on Mac, the signature under the **New messages** and + **Replies/forwards** sections of the sending account is set to **(none)**. + + + - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in + Version 4.2352.0. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported + in Outlook on mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Disable the client signature. + + Office.context.mailbox.item.disableClientSignatureAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("disableClientSignatureAsync succeeded"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + disableClientSignatureAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: disableClientSignatureAsync(callback) + uid: 'outlook!Office.MessageCompose#disableClientSignatureAsync:member(2)' + package: outlook! + fullName: disableClientSignatureAsync(callback) + summary: >- + Disables the Outlook client signature. + + + The behavior of this method depends on which client the add-in is running. + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the signature option + for new mails, replies, and forwards is disabled. A signature that's selected is also disabled by the method. + + + - In Outlook on Windows (classic) and on Mac, the signature under the **New messages** and + **Replies/forwards** sections of the sending account is set to **(none)**. + + + - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in + Version 4.2352.0. For more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported + in Outlook on mobile devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: 'disableClientSignatureAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.MessageCompose#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachment-content.yaml + + + // Gets the attachments of the current message or appointment in compose mode. + + const options = { asyncContext: { currentItem: item } }; + + // The getAttachmentsAsync call can only be used in compose mode. + + item.getAttachmentsAsync(options, callback); + + + function callback(result) { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + if (result.value.length <= 0) { + console.log("Mail item has no attachments."); + return; + } + + for (let i = 0; i < result.value.length; i++) { + // Log the attachment type and its contents to the console. + result.asyncContext.currentItem.getAttachmentContentAsync(result.value[i].id, handleAttachmentsCallback); + } + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.MessageCompose#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, + use that identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentsAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getAttachmentsAsync:member(1)' + package: outlook! + fullName: 'getAttachmentsAsync(options, callback)' + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + Office.context.mailbox.item.getAttachmentsAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + if (result.value.length > 0) { + for (let i = 0; i < result.value.length; i++) { + const attachment = result.value[i]; + let attachmentType; + switch (attachment.attachmentType) { + case Office.MailboxEnums.AttachmentType.Cloud: + attachmentType = "Attachment is stored in a cloud location"; + break; + case Office.MailboxEnums.AttachmentType.File: + attachmentType = "Attachment is a file"; + break; + case Office.MailboxEnums.AttachmentType.Item: + attachmentType = "Attachment is an Exchange item"; + break; + } + console.log( + "ID: " + + attachment.id + + "\n" + + "Type: " + + attachmentType + + "\n" + + "Name: " + + attachment.name + + "\n" + + "Size: " + + attachment.size + + "\n" + + "isInline: " + + attachment.isInline + ); + } + } else { + console.log("No attachments on this message."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAttachmentsAsync(callback) + uid: 'outlook!Office.MessageCompose#getAttachmentsAsync:member(2)' + package: outlook! + fullName: getAttachmentsAsync(callback) + summary: Gets the item's attachments as an array. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will + contain an error code with the reason for the failure. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'getComposeTypeAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getComposeTypeAsync:member(1)' + package: outlook! + fullName: 'getComposeTypeAsync(options, callback)' + summary: >- + Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. The + coercion type can be HTML or plain text. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. For + more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: >- + getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with + the item's compose type and coercion type. + type: '(asyncResult: <any>) => void' + return: + type: void + description: An object with `ComposeType` and `CoercionType` enum values for the message item. + - name: getComposeTypeAsync(callback) + uid: 'outlook!Office.MessageCompose#getComposeTypeAsync:member(2)' + package: outlook! + fullName: getComposeTypeAsync(callback) + summary: >- + Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. The + coercion type can be HTML or plain text. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. For + more information on supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Get the compose type of the current message. + + Office.context.mailbox.item.getComposeTypeAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log( + "getComposeTypeAsync succeeded with composeType: " + + asyncResult.value.composeType + + " and coercionType: " + + asyncResult.value.coercionType + ); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with + the item's compose type and coercion type. + type: '(asyncResult: <any>) => void' + return: + type: void + description: An object with `ComposeType` and `CoercionType` enum values for the message item. + - name: 'getConversationIndexAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getConversationIndexAsync:member(1)' + package: outlook! + fullName: 'getConversationIndexAsync(options, callback)' + summary: Gets the Base64-encoded position of the current message in a conversation thread. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its + contents to provide context for the current message being composed. + isPreview: false + isDeprecated: false + syntax: + content: >- + getConversationIndexAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded position of + the current message in a conversation is returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getConversationIndexAsync(callback) + uid: 'outlook!Office.MessageCompose#getConversationIndexAsync:member(2)' + package: outlook! + fullName: getConversationIndexAsync(callback) + summary: Gets the Base64-encoded position of the current message in a conversation thread. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its + contents to provide context for the current message being composed. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-conversation-index.yaml + + + // This snippet returns the Base64-encoded position of the current message in a conversation thread + (PR_CONVERSATION_INDEX). + + // The API call is supported on a message being composed and isn't supported on read items or appointments. + + Office.context.mailbox.item.getConversationIndexAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.log(result.error.message); + return; + } + + const conversationIndex = result.value; + if (conversationIndex) { + console.log("Position in the conversation thread: " + conversationIndex); + } else { + console.log("The current message doesn't belong to a conversation thread."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded position of + the current message in a conversation is returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Get the initialization context (if present). + + Office.context.mailbox.item.getInitializationContextAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + if (asyncResult.value.length > 0) { + // The value is a string, parse to an object. + const context = JSON.parse(asyncResult.value); + // Do something with context. + } else { + // Empty context, treat as no context. + } + } else { + // Handle the error. + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.MessageCompose#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getItemClassAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getItemClassAsync:member(1)' + package: outlook! + fullName: 'getItemClassAsync(options, callback)' + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + The following table lists the default message classes. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ isPreview: false + isDeprecated: false + syntax: + content: >- + getItemClassAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The message class is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getItemClassAsync(callback) + uid: 'outlook!Office.MessageCompose#getItemClassAsync:member(2)' + package: outlook! + fullName: getItemClassAsync(callback) + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + The following table lists the default message classes. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-class-async.yaml + + + // This snippet returns the Exchange Web Services item class property (PR_MESSAGE_CLASS) of the current message. + + // The API call is only supported on a message being composed. + + Office.context.mailbox.item.getItemClassAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Action failed with error: " + asyncResult.error.message); + return; + } + + console.log("Item class of the current message: " + asyncResult.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The message class is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getItemIdAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getItemIdAsync:member(1)' + package: outlook! + fullName: 'getItemIdAsync(options, callback)' + summary: >- + Asynchronously gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of a saved item. + + + When invoked, this method returns the item ID via the callback function. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware + that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item + is synced, the item ID isn't recognized and using it returns an error. + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + isPreview: false + isDeprecated: false + syntax: + content: >- + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` + property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getItemIdAsync(callback) + uid: 'outlook!Office.MessageCompose#getItemIdAsync:member(2)' + package: outlook! + fullName: getItemIdAsync(callback) + summary: >- + Asynchronously gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of a saved item. + + + When invoked, this method returns the item ID via the callback function. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), be aware + that when Outlook is in cached mode, it may take some time before the item is synced to the server. Until the item + is synced, the item ID isn't recognized and using it returns an error. + + + **Errors**: + + + - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/item-id-compose.yaml + + + Office.context.mailbox.item.getItemIdAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`getItemIdAsync failed with message: ${result.error.message}`); + return; + } + + console.log(result.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` + property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getSelectedDataAsync(coercionType, options, callback)' + uid: 'outlook!Office.MessageCompose#getSelectedDataAsync:member(1)' + package: outlook! + fullName: 'getSelectedDataAsync(coercionType, options, callback)' + summary: >- + Asynchronously returns selected data from the subject or body of a message. + + + If there is no selection but the cursor is in the body or subject, the method returns an empty string for the + selected data. If a field other than the body or subject is selected, the method returns the `InvalidSelection` + error. + + + To access the selected data from the callback function, call `asyncResult.value.data`. To access the + source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be + either `body` or `subject`. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Get selected data. + + Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, { option1: "option1"}, getCallback); + + + function getCallback(asyncResult) { + const text = asyncResult.value.data; + const prop = asyncResult.value.sourceProperty; + + console.log(`Selected text in ${prop}: ${text}`); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getSelectedDataAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, + callback: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: coercionType + description: >- + Requests a format for the data. If `Text`, the method returns the plain text as a string, removing + any HTML tags present. If `Html`, the method returns the selected text, whether it is plaintext or + HTML. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <any>) => void' + return: + type: void + description: The selected data as a string with format determined by `coercionType`. + - name: 'getSelectedDataAsync(coercionType, callback)' + uid: 'outlook!Office.MessageCompose#getSelectedDataAsync:member(2)' + package: outlook! + fullName: 'getSelectedDataAsync(coercionType, callback)' + summary: >- + Asynchronously returns selected data from the subject or body of a message. + + + If there is no selection but the cursor is in the body or subject, the method returns an empty string for the + selected data. If a field other than the body or subject is selected, the method returns the `InvalidSelection` + error. + + + To access the selected data from the callback function, call `asyncResult.value.data`. To access the + source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be + either `body` or `subject`. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/get-selected-data.yaml + + + Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const text = asyncResult.value.data; + const prop = asyncResult.value.sourceProperty; + console.log("Selected text in " + prop + ": " + text); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getSelectedDataAsync(coercionType: Office.CoercionType | string, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: coercionType + description: >- + Requests a format for the data. If `Text`, the method returns the plain text as a string, removing + any HTML tags present. If `Html`, the method returns the selected text, whether it is plaintext or + HTML. + type: ' | string' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <any>) => void' + return: + type: void + description: The selected data as a string with format determined by `coercionType`. + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + + + **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic) unless the + following conditions are met. + + + a. **Delegate access/Shared folders** + + + 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + + + 3. The delegate opens the draft from the shared folder then continues composing. + + + b. **Shared mailbox (applies to classic Outlook on Windows only)** + + + 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + + + 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + + + The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared + properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.MessageCompose#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + + + **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic) unless the + following conditions are met. + + + a. **Delegate access/Shared folders** + + + 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + + + 3. The delegate opens the draft from the shared folder then continues composing. + + + b. **Shared mailbox (applies to classic Outlook on Windows only)** + + + 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + + + 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + + + 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + + + The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared + properties. After the message has been sent, it's usually found in the sender's **Sent Items** folder. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml + + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + const sharedProperties = result.value; + console.log(`Owner: ${sharedProperties.owner}`); + console.log(`Permissions: ${sharedProperties.delegatePermissions}`); + console.log(`Target mailbox: ${sharedProperties.targetMailbox}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'isClientSignatureEnabledAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#isClientSignatureEnabledAsync:member(1)' + package: outlook! + fullName: 'isClientSignatureEnabledAsync(options, callback)' + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic) and on Mac, the API call returns `true` if the default signature for new messages, + replies, or forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook + on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API call + returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac, or disabled in Outlook on the + web or new Outlook on Windows, the API call returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/work-with-client-signatures.yaml + + + // Check if the client signature is currently enabled. + + Office.context.mailbox.item.isClientSignatureEnabledAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("isClientSignatureEnabledAsync succeeded with result: " + asyncResult.value); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: isClientSignatureEnabledAsync(callback) + uid: 'outlook!Office.MessageCompose#isClientSignatureEnabledAsync:member(2)' + package: outlook! + fullName: isClientSignatureEnabledAsync(callback) + summary: >- + Gets if the client signature is enabled. + + + In Outlook on Windows (classic) and on Mac, the API call returns `true` if the default signature for new messages, + replies, or forwards is set to a template for the sending Outlook account. In Outlook on the web and [new Outlook + on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the API call + returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac, or disabled in Outlook on the + web or new Outlook on Windows, the API call returns `false`. + remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: 'isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.MessageCompose#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get, set, save, and remove custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/15-item-custom-properties/load-set-get-save.yaml + + + Office.context.mailbox.item.loadCustomPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`loadCustomPropertiesAsync failed with message ${result.error.message}`); + return; + } + + customProps = result.value; + console.log("Loaded the CustomProperties object."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'removeAttachmentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.MessageCompose#removeAttachmentAsync:member(1)' + package: outlook! + fullName: 'removeAttachmentAsync(attachmentId, options, callback)' + summary: >- + Removes an attachment from a message or appointment. + + + The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. As a best + practice, you should use the attachment identifier to remove an attachment only if the same mail app has added + that attachment in the same session. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. To remove + an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + Use the [Office.Body](https://learn.microsoft.com/javascript/api/outlook/office.body) APIs to get and set the body + of an item. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/attachments-compose.yaml + + + Office.context.mailbox.item.removeAttachmentAsync( + $("#attachmentId") + .val() + .toString(), + (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(result.error.message); + return; + } + + console.log(`Attachment removed successfully.`); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAttachmentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: >- + The identifier of the attachment to remove. The maximum string length of the `attachmentId` is 200 + characters in Outlook on the web and on Windows (new and classic). + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` + property will contain an error code with the reason for the failure. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAttachmentAsync(attachmentId, callback)' + uid: 'outlook!Office.MessageCompose#removeAttachmentAsync:member(2)' + package: outlook! + fullName: 'removeAttachmentAsync(attachmentId, callback)' + summary: >- + Removes an attachment from a message or appointment. + + + The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. As a best + practice, you should use the attachment identifier to remove an attachment only if the same mail app has added + that attachment in the same session. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. To remove + an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + Use the [Office.Body](https://learn.microsoft.com/javascript/api/outlook/office.body) APIs to get and set the body + of an item. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): + void; + parameters: + - id: attachmentId + description: >- + The identifier of the attachment to remove. The maximum string length of the `attachmentId` is 200 + characters in Outlook on the web and on Windows (new and classic). + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` + property will contain an error code with the reason for the failure. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, options, callback)' + uid: 'outlook!Office.MessageCompose#removeHandlerAsync:member(1)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, options, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, callback)' + uid: 'outlook!Office.MessageCompose#removeHandlerAsync:member(2)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.removeHandlerAsync(Office.EventType.ItemChanged, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to remove event handler: " + asyncResult.error.message); + return; + } + + console.log("Event handler removed successfully."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'saveAsync(options, callback)' + uid: 'outlook!Office.MessageCompose#saveAsync:member(1)' + package: outlook! + fullName: 'saveAsync(options, callback)' + summary: Asynchronously saves the current message as a draft. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook + is in cached mode, it may take some time before the item is actually synced to the server. Until the item is + synced, using the item ID will return an error. + + + - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when + `saveAsync` is called on a message that will be sent from a shared mailbox account. If the sender creates a new + message from their personal mailbox and selects the shared mailbox account in the **From** field, `saveAsync` + saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the shared + mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and + creates a new message there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS message ID is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: saveAsync(callback) + uid: 'outlook!Office.MessageCompose#saveAsync:member(2)' + package: outlook! + fullName: saveAsync(callback) + summary: Asynchronously saves the current message as a draft. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Important**: + + + - In Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), or classic Outlook on + Windows in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is + saved to the local cache. + + + - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. + This means that subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even + `saveAsync` may not result in the same content. + + + - The identifier returned is the same as the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange). The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that when Outlook + is in cached mode, it may take some time before the item is actually synced to the server. Until the item is + synced, using the item ID will return an error. + + + - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when + `saveAsync` is called on a message that will be sent from a shared mailbox account. If the sender creates a new + message from their personal mailbox and selects the shared mailbox account in the **From** field, `saveAsync` + saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the shared + mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and + creates a new message there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.saveAsync( + function callback(result) { + // Process the result. + }); + + // The following is an example of the + + // `result` parameter passed to the + + // callback function. The `value` + + // property contains the item ID of + + // the item. + + { + "value": "AAMkADI5...AAA=", + "status": "succeeded" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The EWS message ID is returned in + the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, options, callback)' + uid: 'outlook!Office.MessageCompose#setSelectedDataAsync:member(1)' + package: outlook! + fullName: 'setSelectedDataAsync(data, options, callback)' + summary: >- + Asynchronously inserts data into the body or subject of a message. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of + the item, or, if text is selected in the editor, it replaces the selected text. If the cursor is not in the body + or subject field, an error is returned. After insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.setSelectedDataAsync("Hello World!", { coercionType : "html" }); + + ``` + + ```TypeScript + + Office.context.mailbox.item.setSelectedDataAsync("Hello World!"); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/set-selected-data.yaml + + + Office.context.mailbox.item.setSelectedDataAsync("Replaced", function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Selected text has been updated successfully."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setSelectedDataAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: data + description: >- + The data to be inserted. Data is not to exceed 1,000,000 characters. If more than 1,000,000 characters are + passed in, an `ArgumentOutOfRange` exception is thrown. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. `coercionType`: If text, the + current style is applied in Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac. + If the field is an HTML editor, only the text data is inserted, even if the data is HTML. If the data is + HTML and the field supports HTML (the subject doesn't), the current style is applied in Outlook on the web + and new Outlook on Windows. The default style is applied in Outlook on Windows (classic) and on Mac. If the + field is a text field, an `InvalidDataFormat` error is returned. If `coercionType` is not set, the result + depends on the field: if the field is HTML then HTML is used; if the field is text, then plain text is used. + type: >- + & + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setSelectedDataAsync(data, callback)' + uid: 'outlook!Office.MessageCompose#setSelectedDataAsync:member(2)' + package: outlook! + fullName: 'setSelectedDataAsync(data, callback)' + summary: >- + Asynchronously inserts data into the body or subject of a message. + + + The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of + the item, or, if text is selected in the editor, it replaces the selected text. If the cursor is not in the body + or subject field, an error is returned. After insertion, the cursor is placed at the end of the inserted content. + remarks: >- + \[ [API set: Mailbox 1.2](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose + + + **Errors**: + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: 'setSelectedDataAsync(data: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: data + description: >- + The data to be inserted. Data is not to exceed 1,000,000 characters. If more than 1,000,000 characters are + passed in, an `ArgumentOutOfRange` exception is thrown. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.messageread.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.messageread.yml new file mode 100644 index 0000000000..eb2db3418f --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.messageread.yml @@ -0,0 +1,3251 @@ +### YamlMime:TSType +name: Office.MessageRead +uid: 'outlook!Office.MessageRead:interface' +package: outlook! +fullName: Office.MessageRead +summary: >- + The message read mode of [Office.context.mailbox.item](xref:outlook!Office.Item:interface). + + + **Important**: + + + - This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a + mode of `Office.context.mailbox.item`. For more information, refer to the [Object + Model](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item) + page. + + + - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be + turned on. For guidance on how to configure the Reading Pane, see [Use and configure the Reading Pane to preview + messages](https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0). + + + Parent interfaces: + + + - [ItemRead](xref:outlook!Office.ItemRead:interface) + + + - [Message](xref:outlook!Office.Message:interface) +remarks: |- + + + #### Examples + + ```TypeScript + // The following code builds an HTML string with details of all attachments on the current item. + const item = Office.context.mailbox.item; + let outputString = ""; + if (item.attachments.length > 0) { + for (let i = 0 ; i < item.attachments.length ; i++) { + const attachment = item.attachments[i]; + outputString += "
" + i + ". Name: "; + outputString += attachment.name; + outputString += "
ID: " + attachment.id; + outputString += "
contentType: " + attachment.contentType; + outputString += "
size: " + attachment.size; + outputString += "
attachmentType: " + attachment.attachmentType; + outputString += "
isInline: " + attachment.isInline; + } + } + console.log(outputString); + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachments + uid: 'outlook!Office.MessageRead#attachments:member' + package: outlook! + fullName: attachments + summary: Gets the item's attachments as an array. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not + returned. For more information, see [Blocked attachments in + Outlook](https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519). + + + #### Examples + + + ```TypeScript + + // The following code builds an HTML string with details of all attachments on the current item. + + const item = Office.context.mailbox.item; + + let outputString = ""; + + + if (item.attachments.length > 0) { + for (let i = 0 ; i < item.attachments.length ; i++) { + const attachment = item.attachments[i]; + outputString += "
" + i + ". Name: "; + outputString += attachment.name; + outputString += "
ID: " + attachment.id; + outputString += "
contentType: " + attachment.contentType; + outputString += "
size: " + attachment.size; + outputString += "
attachmentType: " + attachment.attachmentType; + outputString += "
isInline: " + attachment.isInline; + } + } + + + console.log(outputString); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachments-read.yaml + + + const attachments = Office.context.mailbox.item.attachments; + + console.log(attachments); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'attachments: AttachmentDetails[];' + return: + type: '[]' + - name: body + uid: 'outlook!Office.MessageRead#body:member' + package: outlook! + fullName: body + summary: Gets an object that provides methods for manipulating the body of an item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // This example gets the body of the item as plain text. + + Office.context.mailbox.item.body.getAsync( + "text", + { asyncContext: "This is passed to the callback" }, + function callback(result) { + // Do something with the result. + }); + + // The following is an example of the result parameter passed to the callback function. + + { + "value": "TEXT of whole body (including threads below)", + "status": "succeeded", + "asyncContext": "This is passed to the callback" + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'body: Body;' + return: + type: '' + - name: categories + uid: 'outlook!Office.MessageRead#categories:member' + package: outlook! + fullName: categories + summary: Gets an object that provides methods for managing the item's categories. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/45-categories/work-with-categories.yaml + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + console.log("Categories assigned to this item:"); + console.log(JSON.stringify(categories)); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + // Note: In order for you to successfully add a category, + + // it must be in the mailbox categories master list. + + + Office.context.mailbox.masterCategories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const masterCategories = asyncResult.value; + if (masterCategories && masterCategories.length > 0) { + // Grab the first category from the master list. + const categoryToAdd = [masterCategories[0].displayName]; + Office.context.mailbox.item.categories.addAsync(categoryToAdd, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully assigned category '${categoryToAdd}' to item.`); + } else { + console.log("categories.addAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories in the master list on this mailbox. You can add categories using Office.context.mailbox.masterCategories.addAsync."); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.categories.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const categories = asyncResult.value; + if (categories && categories.length > 0) { + // Grab the first category assigned to this item. + const categoryToRemove = [categories[0].displayName]; + Office.context.mailbox.item.categories.removeAsync(categoryToRemove, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(`Successfully unassigned category '${categoryToRemove}' from this item.`); + } else { + console.log("categories.removeAsync call failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("There are no categories assigned to this item."); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'categories: Categories;' + return: + type: '' + - name: cc + uid: 'outlook!Office.MessageRead#cc:member' + package: outlook! + fullName: cc + summary: >- + Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on + the mode of the current item. + + + The `cc` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each recipient listed on the + **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + + + - classic Windows: 500 recipients + + + - Android, classic Mac UI, iOS: 100 recipients + + + - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + + + - New Mac UI: No limit + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-cc-message-read.yaml + + + const msgCc = Office.context.mailbox.item.cc; + + console.log("Message copied to:"); + + for (let i = 0; i < msgCc.length; i++) { + console.log(msgCc[i].displayName + " (" + msgCc[i].emailAddress + ")"); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'cc: EmailAddressDetails[];' + return: + type: '[]' + - name: conversationId + uid: 'outlook!Office.MessageRead#conversationId:member' + package: outlook! + fullName: conversationId + summary: >- + Gets an identifier for the email conversation that contains a particular message. + + + You can get an integer for this property if your mail app is activated in read forms or responses in compose + forms. If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation + ID for that message will change and that value you obtained earlier will no longer apply. + + + You get null for this property for a new item in a compose form. If the user sets a subject and saves the item, + the `conversationId` property will return a value. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-conversation-id-message.yaml + + + console.log(`Conversation ID: ${Office.context.mailbox.item.conversationId}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'conversationId: string;' + return: + type: string + - name: dateTimeCreated + uid: 'outlook!Office.MessageRead#dateTimeCreated:member' + package: outlook! + fullName: dateTimeCreated + summary: Gets the date and time that an item was created. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-date-time-created-read.yaml + + + console.log(`Creation date and time: ${Office.context.mailbox.item.dateTimeCreated}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeCreated: Date;' + return: + type: Date + - name: dateTimeModified + uid: 'outlook!Office.MessageRead#dateTimeModified:member' + package: outlook! + fullName: dateTimeModified + summary: Gets the date and time that an item was last modified. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on + supported APIs in Outlook mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-date-time-modified-read.yaml + + + console.log(`Date and time item last modified: ${Office.context.mailbox.item.dateTimeModified}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'dateTimeModified: Date;' + return: + type: Date + - name: end + uid: 'outlook!Office.MessageRead#end:member' + package: outlook! + fullName: end + summary: >- + Gets the date and time that the appointment is to end. + + + The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You can + use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + + + When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to + convert the local time on the client to UTC for the server. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-end-read.yaml + + + console.log(`Appointment ends: ${Office.context.mailbox.item.end}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'end: Date;' + return: + type: Date + - name: from + uid: 'outlook!Office.MessageRead#from:member' + package: outlook! + fullName: from + summary: >- + Gets the email address of the sender of a message. + + + The `from` and `sender` properties represent the same person unless the message is sent by a delegate. In that + case, the `from` property represents the delegator, and the `sender` property represents the delegate. + + + **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `from` property is + undefined. + + + The `from` property returns an `EmailAddressDetails` object. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-from-message-read.yaml + + + const msgFrom = Office.context.mailbox.item.from; + + console.log("Message received from: " + msgFrom.displayName + " (" + msgFrom.emailAddress + ")"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'from: EmailAddressDetails;' + return: + type: '' + - name: internetMessageId + uid: 'outlook!Office.MessageRead#internetMessageId:member' + package: outlook! + fullName: internetMessageId + summary: >- + Gets the internet message identifier for an email message. + + + **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently + sent items. In that case, consider using [Exchange Web + Services](https://learn.microsoft.com/office/dev/add-ins/outlook/web-services) to get this [property from the + server](https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid). + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-internet-message-id-read.yaml + + + console.log(`Internet message ID: ${Office.context.mailbox.item.internetMessageId}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'internetMessageId: string;' + return: + type: string + - name: itemClass + uid: 'outlook!Office.MessageRead#itemClass:member' + package: outlook! + fullName: itemClass + summary: Gets the Exchange Web Services item class of the selected message. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + The following table lists the default item classes for messages. + + + + + + + +
Item class Description
IPM.Note New messages and message + replies
IPM.Note.SMIME Encrypted messages that can also be signed
IPM.Note.SMIME.MultipartSigned Clear-signed messages
IPM.Schedule.Meeting.Request Meeting requests
IPM.Schedule.Meeting.CanceledMeeting cancellations
IPM.Schedule.Meeting.Resp.Neg Responses to decline meeting + requests
IPM.Schedule.Meeting.Resp.Pos Responses to accept meeting requests
IPM.Schedule.Meeting.Resp.Tent Responses to tentatively accept meeting requests
+ + + You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-class-read.yaml + + + console.log(`Item class: ${Office.context.mailbox.item.itemClass}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemClass: string;' + return: + type: string + - name: itemId + uid: 'outlook!Office.MessageRead#itemId:member' + package: outlook! + fullName: itemId + summary: >- + Gets the [Exchange Web Services (EWS) item + identifier](https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange) + of the current item. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - The `itemId` property isn't available in compose mode. If an item identifier is required, the + `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the + item identifier in the `asyncResult.value` parameter in the callback function. If the item is already saved, you + can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + + + - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + + + #### Examples + + + ```TypeScript + + // The following code checks for the presence of an item + + // identifier. If the `itemId` property returns `null` or + + // `undefined`, it saves the item to the store and gets the + + // item identifier from the asynchronous result. + + // **Important**: `saveAsync` was introduced with requirement set 1.3 + + // so you can't get the `itemId` in Compose mode in earlier sets. + + let itemId = Office.context.mailbox.item.itemId; + + if (itemId === null || itemId == undefined) { + Office.context.mailbox.item.saveAsync(function(result) { + itemId = result.value; + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemId: string;' + return: + type: string + - name: itemType + uid: 'outlook!Office.MessageRead#itemType:member' + package: outlook! + fullName: itemType + summary: >- + Gets the type of item that an instance represents. + + + The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object + instance is a message or an appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml + + + const itemType = Office.context.mailbox.item.itemType; + + switch (itemType) { + case Office.MailboxEnums.ItemType.Appointment: + console.log(`Current item is an ${itemType}.`); + break; + case Office.MailboxEnums.ItemType.Message: + console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`); + break; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: location + uid: 'outlook!Office.MessageRead#location:member' + package: outlook! + fullName: location + summary: |- + Gets the location of a meeting request. + + The `location` property returns a string that contains the location of the appointment. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-location-read.yaml + + + console.log(`Appointment location: ${Office.context.mailbox.item.location}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'location: string;' + return: + type: string + - name: normalizedSubject + uid: 'outlook!Office.MessageRead#normalizedSubject:member' + package: outlook! + fullName: normalizedSubject + summary: >- + Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + + + The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) + that are added by email programs. To get the subject of the item with the prefixes intact, use the `subject` + property. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-normalized-subject-read.yaml + + + console.log(`Normalized subject: ${Office.context.mailbox.item.normalizedSubject}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'normalizedSubject: string;' + return: + type: string + - name: notificationMessages + uid: 'outlook!Office.MessageRead#notificationMessages:member' + package: outlook! + fullName: notificationMessages + summary: Gets the notification messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds a progress indicator to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, + message: "Progress indicator with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an informational notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Non-persistent informational notification message with id = " + id, + icon: "icon1", + persistent: false + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds a persistent information notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Persistent informational notification message with id = " + id, + icon: "icon1", + persistent: true + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + + ... + + + // Replaces a notification message of a given key with another message. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.replaceAsync( + id, + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Notification message with id = " + id + " has been replaced with an informational message.", + icon: "icon2", + persistent: false + }, + handleResult); + + ... + + + // Removes a notification message from the current mail item. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.removeAsync(id, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'notificationMessages: NotificationMessages;' + return: + type: '' + - name: recurrence + uid: 'outlook!Office.MessageRead#recurrence:member' + package: outlook! + fullName: recurrence + summary: >- + Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose + modes for appointment items. Read mode for meeting request items. + + + The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item + is a series or an instance in a series. `null` is returned for single appointments and meeting requests of single + appointments. `undefined` is returned for messages that are not meeting requests. + + + **Note**: Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. + + + **Note**: If the `recurrence` object is null, this indicates that the object is a single appointment or a + meeting request of a single appointment and NOT a part of a series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-recurrence-read.yaml + + + const recurrence = Office.context.mailbox.item.recurrence; + + + if (recurrence === undefined) { + console.log("This item is a message but not a meeting request."); + } else if (recurrence === null) { + console.log("This is a single appointment."); + } else { + console.log(JSON.stringify(recurrence)); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'recurrence: Recurrence;' + return: + type: '' + - name: sender + uid: 'outlook!Office.MessageRead#sender:member' + package: outlook! + fullName: sender + summary: >- + Gets the email address of the sender of an email message. + + + The `from` and `sender` properties represent the same person unless the message is sent by a delegate. In that + case, the `from` property represents the delegator, and the `sender` property represents the delegate. + + + **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is + undefined. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-sender-message-read.yaml + + + const msgSender = Office.context.mailbox.item.sender; + + console.log("Sender: " + msgSender.displayName + " (" + msgSender.emailAddress + ")"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'sender: EmailAddressDetails;' + return: + type: '' + - name: seriesId + uid: 'outlook!Office.MessageRead#seriesId:member' + package: outlook! + fullName: seriesId + summary: >- + Gets the ID of the series that an instance belongs to. + + + In Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), and on Mac, the + `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + However, in Outlook on Android and on iOS, the `seriesId` returns the REST ID of the parent item. + + + **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item + identifier. The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. Before + making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. For more details, see [Use the Outlook REST APIs from an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api). + + + The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series + items, or meeting requests and returns `undefined` for any other items that aren't meeting requests. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-series-id.yaml + + + const seriesId = Office.context.mailbox.item.seriesId; + + + if (seriesId === undefined) { + console.log("This is a message that's not a meeting request."); + } else if (seriesId === null) { + console.log("This is a single appointment, a parent series, or a meeting request for a series or single meeting."); + } else { + console.log("This is an instance belonging to series with ID " + seriesId); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'seriesId: string;' + return: + type: string + - name: start + uid: 'outlook!Office.MessageRead#start:member' + package: outlook! + fullName: start + summary: >- + Gets the date and time that the appointment is to begin. + + + The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. You + can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-start-read.yaml + + + console.log(`Appointment starts: ${Office.context.mailbox.item.start}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'start: Date;' + return: + type: Date + - name: subject + uid: 'outlook!Office.MessageRead#subject:member' + package: outlook! + fullName: subject + summary: >- + Gets the description that appears in the subject field of an item. + + + The `subject` property gets or sets the entire subject of the item, as sent by the email server. + + + The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading + prefixes such as RE: and FW:. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-subject-read.yaml + + + console.log(`Subject: ${Office.context.mailbox.item.subject}`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'subject: string;' + return: + type: string + - name: to + uid: 'outlook!Office.MessageRead#to:member' + package: outlook! + fullName: to + summary: >- + Provides access to the recipients on the **To** line of a message. The type of object and level of access + depend on the mode of the current item. + + + The `to` property returns an array that contains an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object for each recipient listed on the + **To** line of the message. The maximum number of recipients returned varies per Outlook client. + + + - classic Windows: 500 recipients + + + - Android, classic Mac UI, iOS: 100 recipients + + + - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + + + - New Mac UI: No limit + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-to-message-read.yaml + + + const msgTo = Office.context.mailbox.item.to; + + const distributionLists = []; + + const externalRecipients = []; + + const internalRecipients = []; + + const otherRecipients = []; + + for (let i = 0; i < msgTo.length; i++) { + switch (msgTo[i].recipientType) { + case Office.MailboxEnums.RecipientType.DistributionList: + distributionLists.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.ExternalUser: + externalRecipients.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.User: + internalRecipients.push(msgTo[i]); + break; + case Office.MailboxEnums.RecipientType.Other: + otherRecipients.push(msgTo[i]); + } + } + + + if (distributionLists.length > 0) { + console.log("Distribution Lists:"); + distributionLists.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (externalRecipients.length > 0) { + console.log("External Recipients:"); + externalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (internalRecipients.length > 0) { + console.log("Internal Recipients:"); + internalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + + if (otherRecipients.length > 0) { + console.log("Other Recipients:"); + otherRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`)); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'to: EmailAddressDetails[];' + return: + type: '[]' +methods: + - name: 'addHandlerAsync(eventType, handler, options, callback)' + uid: 'outlook!Office.MessageRead#addHandlerAsync:member(1)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, options, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + function myHandlerFunction(eventarg) { + if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) { + const attachment = eventarg.attachmentDetails; + console.log("Event Fired and Attachment Added!"); + getAttachmentContentAsync(attachment.id, options, callback); + } + } + + + Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. + type: any + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addHandlerAsync(eventType, handler, callback)' + uid: 'outlook!Office.MessageRead#addHandlerAsync:member(2)' + package: outlook! + fullName: 'addHandlerAsync(eventType, handler, callback)' + summary: >- + Adds an event handler for a supported event. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + addHandlerAsync(eventType: Office.EventType | string, handler: any, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should invoke the handler. + type: ' | string' + - id: handler + description: >- + The function to handle the event. The function must accept a single parameter, which is an object literal. + The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. + type: any + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayReplyAllForm(formData) + uid: 'outlook!Office.MessageRead#displayReplyAllForm:member(1)' + package: outlook! + fullName: displayReplyAllForm(formData) + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyAllForm` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // The following code passes a string to the `displayReplyAllForm` method. + + Office.context.mailbox.item.displayReplyAllForm('hello there'); + + Office.context.mailbox.item.displayReplyAllForm('hello there'); + + + // Reply with an empty body. + + Office.context.mailbox.item.displayReplyAllForm({}); + + + // Reply with just a body. + + Office.context.mailbox.item.displayReplyAllForm( + + { + + 'htmlBody' : 'hi' + + }); + + + // Reply with a body and a file attachment. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : Office.MailboxEnums.AttachmentType.File, + 'name' : 'squirrel.png', + 'url' : 'http://i.imgur.com/sRgTlGR.jpg' + } + ] + }); + + + // Reply with a body and an item attachment. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : 'item', + 'name' : 'rand', + 'itemId' : Office.context.mailbox.item.itemId + } + ] + }); + + + // Reply with a body, file attachment, item attachment, and a callback. + + Office.context.mailbox.item.displayReplyAllForm( + + { + 'htmlBody' : 'hi', + 'attachments' : + [ + { + 'type' : Office.MailboxEnums.AttachmentType.File, + 'name' : 'squirrel.png', + 'url' : 'http://i.imgur.com/sRgTlGR.jpg' + }, + { + 'type' : 'item', + 'name' : 'rand', + 'itemId' : Office.context.mailbox.item.itemId + } + ], + 'callback' : function(asyncResult) + { + console.log(asyncResult.value); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyAllForm("This is a reply ALL with some bold text."); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayReplyAllForm(formData: string | ReplyFormData): void;' + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + return: + type: void + description: '' + - name: 'displayReplyAllFormAsync(formData, options, callback)' + uid: 'outlook!Office.MessageRead#displayReplyAllFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyAllFormAsync("This is a reply ALL with some bold text.", function( + asyncResult + ) { + console.log(JSON.stringify(asyncResult)); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyAllFormAsync(formData, callback)' + uid: 'outlook!Office.MessageRead#displayReplyAllFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyAllFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes either the sender and all recipients of the selected message or the organizer + and all attendees of the selected appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) + => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: displayReplyForm(formData) + uid: 'outlook!Office.MessageRead#displayReplyForm:member(1)' + package: outlook! + fullName: displayReplyForm(formData) + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyForm("This is a reply with some text in italics."); + + + ... + + + Office.context.mailbox.item.displayReplyForm({ + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "https://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ], + callback: (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + + console.log("Created reply with attachments."); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayReplyForm(formData: string | ReplyFormData): void;' + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, options, callback)' + uid: 'outlook!Office.MessageRead#displayReplyFormAsync:member(1)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, options, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-forms.yaml + + + Office.context.mailbox.item.displayReplyFormAsync("This is a reply with some text in italics.", function( + asyncResult + ) { + console.log(JSON.stringify(asyncResult)); + }); + + + ... + + + // The async version is only available starting with requirement set 1.9. + + // It provides a callback when the new appointment form has been created. + + Office.context.mailbox.item.displayReplyFormAsync( + { + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "http://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ] + }, + (asyncResult) => { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'displayReplyFormAsync(formData, callback)' + uid: 'outlook!Office.MessageRead#displayReplyFormAsync:member(2)' + package: outlook! + fullName: 'displayReplyFormAsync(formData, callback)' + summary: >- + Displays a reply form that includes only the sender of the selected message or the organizer of the selected + appointment. + remarks: >- + \[ [API set: Mailbox 1.9](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the reply form is + displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + + + - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + + + - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all + attachments and attach them to the reply form. If any attachments fail to be added, an error is shown in the form + UI. If this isn't possible, then no error message is thrown. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + isPreview: false + isDeprecated: false + syntax: + content: >- + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: formData + description: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited + to 32 KB OR a [ReplyFormData](xref:outlook!Office.ReplyFormData:interface) object that contains body or + attachment data and a callback function. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAllInternetHeadersAsync(options, callback)' + uid: 'outlook!Office.MessageRead#getAllInternetHeadersAsync:member(1)' + package: outlook! + fullName: 'getAllInternetHeadersAsync(options, callback)' + summary: >- + Gets all the internet headers for the message as a string. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/70-mime-headers/get-internet-headers-message-read.yaml + + + Office.context.mailbox.item.getAllInternetHeadersAsync(function (asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Internet headers received successfully"); + if (asyncResult.value.match(/preferred-fruit:.*/gim)) { + console.log("Sender's preferred fruit: " + asyncResult.value.match(/preferred-fruit:.*/gim)[0].slice(17)); + } else { + console.log("Didn't receive header with sender's preferred fruit"); + } + if (asyncResult.value.match(/preferred-vegetable:.*/gim)) { + console.log( + "Sender's preferred vegetable: " + asyncResult.value.match(/preferred-vegetable:.*/gim)[0].slice(21) + ); + } else { + console.log("Didn't receive header with sender's preferred vegetable"); + } + } else { + console.log("Error getting internet headers: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. On success, the internet headers + data is provided in the `asyncResult.value` property as a string. Refer to [RFC + 2183](https://tools.ietf.org/html/rfc2183) for the formatting information of the returned string value. If + the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAllInternetHeadersAsync(callback) + uid: 'outlook!Office.MessageRead#getAllInternetHeadersAsync:member(2)' + package: outlook! + fullName: getAllInternetHeadersAsync(callback) + summary: >- + Gets all the internet headers for the message as a string. + + + To learn more, see [Get and set internet headers on a message in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. On success, the internet headers + data is provided in the `asyncResult.value` property as a string. Refer to [RFC + 2183](https://tools.ietf.org/html/rfc2183) for the formatting information of the returned string value. If + the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAsFileAsync(options, callback)' + uid: 'outlook!Office.MessageRead#getAsFileAsync:member(1)' + package: outlook! + fullName: 'getAsFileAsync(options, callback)' + summary: Gets the current message in EML format encoded in Base64. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter, + `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded EML format of the message + is returned in the `asyncResult.value` property. Any errors encountered are returned in the + `asyncResult.error` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAsFileAsync(callback) + uid: 'outlook!Office.MessageRead#getAsFileAsync:member(2)' + package: outlook! + fullName: getAsFileAsync(callback) + summary: Gets the current message in EML format encoded in Base64. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-eml-format.yaml + + + Office.context.mailbox.item.getAsFileAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(`Error encountered during processing: ${asyncResult.error.message}`); + return; + } + + console.log(asyncResult.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter, + `asyncResult`, which is an `Office.AsyncResult` object. The Base64-encoded EML format of the message + is returned in the `asyncResult.value` property. Any errors encountered are returned in the + `asyncResult.error` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, options, callback)' + uid: 'outlook!Office.MessageRead#getAttachmentContentAsync:member(1)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, options, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.MessageRead%23attachments:member) call, then in the same session, use that + identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/40-attachments/get-attachment-content.yaml + + + // Gets the attachments of the current message or appointment in read mode. + + // The item.attachments call can only be used in read mode. + + const attachments = item.attachments; + + if (attachments.length <= 0) { + console.log("Mail item has no attachments."); + return; + } + + + for (let i = 0; i < attachments.length; i++) { + // Log the attachment type and its contents to the console. + item.getAttachmentContentAsync(attachments[i].id, handleAttachmentsCallback); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'getAttachmentContentAsync(attachmentId, callback)' + uid: 'outlook!Office.MessageRead#getAttachmentContentAsync:member(2)' + package: outlook! + fullName: 'getAttachmentContentAsync(attachmentId, callback)' + summary: >- + Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + + + The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best + practice, you should get the attachment's identifier from an + [item.attachments](xref:outlook!Office.MessageRead%23attachments:member) call, then in the same session, use that + identifier to retrieve the attachment. In Outlook on the web, on mobile devices, and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the attachment + identifier is valid only within the same session. A session is over when the user closes the app, or if the user + starts composing an inline form then subsequently pops out the form to continue in a separate window. + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Errors**: + + + - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded + images in Rich Text Format, or item attachment types other than email or calendar items (such as a contact or task + item). + + + - `InvalidAttachmentId`: The attachment identifier does not exist. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: attachmentId + description: The identifier of the attachment you want to get. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the + `asyncResult.error` property will contain an error code with the reason for the failure. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getEntities() + uid: 'outlook!Office.MessageRead#getEntities:member(1)' + package: outlook! + fullName: getEntities() + summary: >- + Gets the entities found in the selected item's body. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'getEntities(): Entities;' + return: + type: '' + description: '' + - name: getEntitiesByType(entityType) + uid: 'outlook!Office.MessageRead#getEntitiesByType:member(1)' + package: outlook! + fullName: getEntitiesByType(entityType) + summary: >- + Gets an array of all the entities of the specified entity type found in the selected item's body. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: >- + getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; + parameters: + - id: entityType + description: One of the `EntityType` enumeration values. + type: ' | string' + return: + type: >- + Array<string | | | | + > + description: >- + If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns + `null`. If no entities of the specified type are present in the item's body, the method returns an + empty array. Otherwise, the type of the objects in the returned array depends on the type of entity requested + in the `entityType` parameter. + - name: getFilteredEntitiesByName(name) + uid: 'outlook!Office.MessageRead#getFilteredEntitiesByName:member(1)' + package: outlook! + fullName: getFilteredEntitiesByName(name) + summary: >- + Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest + file. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: >- + getFilteredEntitiesByName(name: string): Array; + parameters: + - id: name + description: The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + type: string + return: + type: >- + Array<string | | | | + > + description: >- + The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the add-in + manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the + manifest with a `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an `ItemHasKnownEntity` element in the manifest, but there are no + entities in the current item that match, the method returns an empty array. + - name: 'getInitializationContextAsync(options, callback)' + uid: 'outlook!Office.MessageRead#getInitializationContextAsync:member(1)' + package: outlook! + fullName: 'getInitializationContextAsync(options, callback)' + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Get the initialization context (if present). + + Office.context.mailbox.item.getInitializationContextAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + if (asyncResult.value.length > 0) { + // The value is a string, parse to an object. + const context = JSON.parse(asyncResult.value); + // Do something with context. + } else { + // Empty context, treat as no context. + } + } else { + // Handle the error. + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getInitializationContextAsync(callback) + uid: 'outlook!Office.MessageRead#getInitializationContextAsync:member(2)' + package: outlook! + fullName: getInitializationContextAsync(callback) + summary: >- + Gets initialization data passed when the add-in is [activated by an actionable + message](https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in). + remarks: >- + \[ [API set: Mailbox 1.8](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. On success, the initialization context data is provided as a string + (or an empty string if there's no initialization context) in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getRegExMatches() + uid: 'outlook!Office.MessageRead#getRegExMatches:member(1)' + package: outlook! + fullName: getRegExMatches() + summary: >- + Returns string values in the selected item that match the regular expressions defined in an add-in only manifest + file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + // The following example shows how to access the array of + + // matches for the regular expression rule elements `fruits` + + // and `veggies`, which are specified in the manifest. + + const allMatches = Office.context.mailbox.item.getRegExMatches(); + + const fruits = allMatches.fruits; + + const veggies = allMatches.veggies; + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + // This API only works when you click on the highlighted word "ScriptLab". + + console.log(Office.context.mailbox.item.getRegExMatches()); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the add-in manifest + file. The name of each array is equal to the corresponding value of the RegExName attribute of the matching + `ItemHasRegularExpressionMatch` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to + occur in the property of the item that's specified by that rule. The `PropertyName` simple type defines the + supported properties. + - name: getRegExMatchesByName(name) + uid: 'outlook!Office.MessageRead#getRegExMatchesByName:member(1)' + package: outlook! + fullName: getRegExMatchesByName(name) + summary: >- + Returns string values in the selected item that match the named regular expression defined in an add-in only + manifest file. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Appointment Attendee + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + const fruits = Office.context.mailbox.item.getRegExMatchesByName("fruits"); + + const veggies = Office.context.mailbox.item.getRegExMatchesByName("veggies"); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + // This API only works when you click on the highlighted word "ScriptLab". + + console.log(Office.context.mailbox.item.getRegExMatchesByName("sampleRegexName")); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getRegExMatchesByName(name: string): string[];' + parameters: + - id: name + description: The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + type: string + return: + type: 'string[]' + description: >- + An array that contains the strings that match the regular expression defined in the + `ItemHasRegularExpressionMatch` rule element in the add-in manifest file, with the specified `RegExName` + element value. + - name: getSelectedEntities() + uid: 'outlook!Office.MessageRead#getSelectedEntities:member(1)' + package: outlook! + fullName: getSelectedEntities() + summary: >- + Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual + add-ins. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'getSelectedEntities(): Entities;' + return: + type: '' + description: '' + - name: getSelectedRegExMatches() + uid: 'outlook!Office.MessageRead#getSelectedRegExMatches:member(1)' + package: outlook! + fullName: getSelectedRegExMatches() + summary: >- + Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest + file. Highlighted matches apply to contextual add-ins. + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + We recommend updating your contextual add-in to use regular expression rules as an alternative solution. For + guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + + + - This method is used with the [activation rules feature for Outlook + add-ins](https://learn.microsoft.com/javascript/api/manifest/rule), which isn't supported by the [unified + manifest for Microsoft 365](https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview). + + + - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook + mobile, see [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression + should further filter the body and shouldn't attempt to return the entire body of the item. Using a regular + expression such as .* to obtain the entire body of an item doesn't always return the expected results. Instead, + use the `Body.getAsync` method to retrieve the entire body. + + + #### Examples + + + ```TypeScript + + // Consider an add-in manifest has the following `Rule` element: + + // + + // + + // + + // + + // + + // + + // + + + // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`. + + //{ + + //'fruits': ['apple','banana','Banana','coconut'], + + //'veggies': ['tomato','onion','spinach','broccoli'] + + //} + + + // The following example shows how to access the array of matches for the + + // regular expression rule elements `fruits` and `veggies`, which are + + // specified in the manifest. + + const selectedMatches = Office.context.mailbox.item.getSelectedRegExMatches(); + + const fruits = selectedMatches.fruits; + + const veggies = selectedMatches.veggies; + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/75-regex-matches/contextual.yaml + + + const matches = Office.context.mailbox.item.getSelectedRegExMatches(); + + if (matches) { + console.log(matches); + } else { + console.error("Open add-in by clicking on a highlighted regex match, for this API to return something useful."); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSelectedRegExMatches(): any;' + return: + type: any + description: >- + An object that contains arrays of strings that match the regular expressions defined in the add-in manifest + file. The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching + `ItemHasRegularExpressionMatch` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to + occur in the property of the item that's specified by that rule. The `PropertyName` simple type defines the + supported properties. + - name: 'getSharedPropertiesAsync(options, callback)' + uid: 'outlook!Office.MessageRead#getSharedPropertiesAsync:member(1)' + package: outlook! + fullName: 'getSharedPropertiesAsync(options, callback)' + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + isPreview: false + isDeprecated: false + syntax: + content: >- + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getSharedPropertiesAsync(callback) + uid: 'outlook!Office.MessageRead#getSharedPropertiesAsync:member(2)' + package: outlook! + fullName: getSharedPropertiesAsync(callback) + summary: >- + Gets the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information around using this API, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). + remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Note**: This method isn't supported in Outlook on iOS or on Android. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml + + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + const sharedProperties = result.value; + console.log(`Owner: ${sharedProperties.owner}`); + console.log(`Permissions: ${sharedProperties.delegatePermissions}`); + console.log(`Target mailbox: ${sharedProperties.targetMailbox}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `asyncResult.value` property + provides the properties of the shared item. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'loadCustomPropertiesAsync(callback, userContext)' + uid: 'outlook!Office.MessageRead#loadCustomPropertiesAsync:member(1)' + package: outlook! + fullName: 'loadCustomPropertiesAsync(callback, userContext)' + summary: >- + Asynchronously loads custom properties for this add-in on the selected item. + + + Custom properties are stored as key-value pairs on a per-app, per-item basis. This method returns a + [CustomProperties](xref:outlook!Office.CustomProperties:interface) object in the callback, which provides methods + to access the custom properties specific to the current item and the current add-in. Custom properties aren't + encrypted on the item, so this shouldn't be used as secure storage. + + + The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. This object + can be used to get, set, save, and remove custom properties from the mail item. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To learn more about custom properties, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/15-item-custom-properties/load-set-get-save.yaml + + + Office.context.mailbox.item.loadCustomPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`loadCustomPropertiesAsync failed with message ${result.error.message}`); + return; + } + + customProps = result.value; + console.log("Loaded the CustomProperties object."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, + userContext?: any): void; + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: >- + (asyncResult: <>) => void + - id: userContext + description: >- + Optional. Developers can provide any object they wish to access in the callback function. This object can be + accessed by the `asyncResult.asyncContext` property in the callback function. + type: any + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, options, callback)' + uid: 'outlook!Office.MessageRead#removeHandlerAsync:member(1)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, options, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeHandlerAsync(eventType, callback)' + uid: 'outlook!Office.MessageRead#removeHandlerAsync:member(2)' + package: outlook! + fullName: 'removeHandlerAsync(eventType, callback)' + summary: >- + Removes the event handlers for a supported event type. **Note**: Events are only available with task pane + implementation. + + + For supported events, refer to the Item object model [events + section](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.removeHandlerAsync(Office.EventType.ItemChanged, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.error("Failed to remove event handler: " + asyncResult.error.message); + return; + } + + console.log("Event handler removed successfully."); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeHandlerAsync(eventType: Office.EventType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: eventType + description: The event that should revoke the handler. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' +extends: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml new file mode 100644 index 0000000000..5cd188cc7d --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessageaction.yml @@ -0,0 +1,122 @@ +### YamlMime:TSType +name: Office.NotificationMessageAction +uid: 'outlook!Office.NotificationMessageAction:interface' +package: outlook! +fullName: Office.NotificationMessageAction +summary: The definition of the action for a notification message. +remarks: >- + \[ [API set: Mailbox 1.10](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + **Important**: In modern Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the + `NotificationMessageAction` object is available in Compose mode only. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds an informational message with actions to the mail item. + + const id = $("#notificationId").val().toString(); + + + const itemId = Office.context.mailbox.item.itemId; + + const details = { + type: Office.MailboxEnums.ItemNotificationMessageType.InsightMessage, + message: "This is an insight notification with id = " + id, + icon: "icon1", + actions: [ + { + actionText: "Open insight", + actionType: Office.MailboxEnums.ActionType.ShowTaskPane, + // Identify whether the current mail item is in read or compose mode to set the appropriate commandId value. + commandId: (itemId == undefined ? "PG.HelpCommand.Compose" : "PG.HelpCommand.Read"), + contextData: { a: "aValue", b: "bValue" } + } + ] + }; + + + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: actionText + uid: 'outlook!Office.NotificationMessageAction#actionText:member' + package: outlook! + fullName: actionText + summary: The text of the action link. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'actionText: string;' + return: + type: string + - name: actionType + uid: 'outlook!Office.NotificationMessageAction#actionType:member' + package: outlook! + fullName: actionType + summary: The type of action to be performed. `ActionType.ShowTaskPane` is the only supported action. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'actionType: string | MailboxEnums.ActionType;' + return: + type: 'string | ' + - name: commandId + uid: 'outlook!Office.NotificationMessageAction#commandId:member' + package: outlook! + fullName: commandId + summary: The button defined in the manifest. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'commandId: string;' + return: + type: string + - name: contextData + uid: 'outlook!Office.NotificationMessageAction#contextData:member' + package: outlook! + fullName: contextData + summary: Any JSON data the action button needs to pass on to the add-in. + remarks: >- + **Important**: + + + - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier + versions of Outlook on Windows, only the `string` type is supported. + + + - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you + create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the + string using `JSON.parse()` once you retrieve it. + isPreview: false + isDeprecated: false + syntax: + content: 'contextData: any;' + return: + type: any diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessagedetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessagedetails.yml new file mode 100644 index 0000000000..efc3fba6fa --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessagedetails.yml @@ -0,0 +1,157 @@ +### YamlMime:TSType +name: Office.NotificationMessageDetails +uid: 'outlook!Office.NotificationMessageDetails:interface' +package: outlook! +fullName: Office.NotificationMessageDetails +summary: An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method. +remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[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/35-notifications/add-getall-remove.yaml + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: actions + uid: 'outlook!Office.NotificationMessageDetails#actions:member' + package: outlook! + fullName: actions + summary: >- + Specifies actions for the message. Limit: 1 action. This limit doesn't count the "Dismiss" action which is + included by default. Only applicable when the type is `InsightMessage`. Specifying this property for an + unsupported type or including too many actions throws an error. + + + **Important**: In modern Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), the `actions` + property is available in Compose mode only. + remarks: >- + \[ [API set: Mailbox 1.10](/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 + isPreview: false + isDeprecated: false + syntax: + content: 'actions?: NotificationMessageAction[];' + return: + type: '[]' + - name: icon + uid: 'outlook!Office.NotificationMessageDetails#icon:member' + package: outlook! + fullName: icon + summary: >- + A reference to an icon that is defined in the manifest. It appears in the infobar area. It is applicable if the + type is `InformationalMessage`, and is required if the type is `InsightMessage`. Specifying this + parameter for an unsupported type results in an exception. + + + **Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g., + Mac, web browser). + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'icon?: string;' + return: + type: string + - name: key + uid: 'outlook!Office.NotificationMessageDetails#key:member' + package: outlook! + fullName: key + summary: The identifier for the notification message. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'key?: string;' + return: + type: string + - name: message + uid: 'outlook!Office.NotificationMessageDetails#message:member' + package: outlook! + fullName: message + summary: >- + The text of the notification message. Maximum length is 150 characters. If the developer passes in a longer + string, an `ArgumentOutOfRange` exception is thrown. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'message: string;' + return: + type: string + - name: persistent + uid: 'outlook!Office.NotificationMessageDetails#persistent:member' + package: outlook! + fullName: persistent + summary: >- + Specifies if the message should be persistent. Only applicable when type is `InformationalMessage`. If + true, the message remains until removed by this add-in or dismissed by the user. If false, it is removed when the + user navigates to a different item. For error notifications, the message persists until the user sees it once. + Specifying this parameter for an unsupported type throws an exception. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'persistent?: Boolean;' + return: + type: Boolean + - name: type + uid: 'outlook!Office.NotificationMessageDetails#type:member' + package: outlook! + fullName: type + summary: >- + Specifies the `ItemNotificationMessageType` of message. + + + If type is `ProgressIndicator` or `ErrorMessage`, an icon is automatically supplied and the message is not + persistent. Therefore the icon and persistent properties are not valid for these types of messages. Including them + will result in an `ArgumentException`. + + + If type is `ProgressIndicator`, the developer should remove or replace the progress indicator when the + action is complete. + + + **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'type: MailboxEnums.ItemNotificationMessageType | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessages.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessages.yml new file mode 100644 index 0000000000..bb8aac8e77 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.notificationmessages.yml @@ -0,0 +1,528 @@ +### YamlMime:TSType +name: Office.NotificationMessages +uid: 'outlook!Office.NotificationMessages:interface' +package: outlook! +fullName: Office.NotificationMessages +summary: The `NotificationMessages` object is returned as the `notificationMessages` property of an item. +remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'addAsync(key, JSONmessage, options, callback)' + uid: 'outlook!Office.NotificationMessages#addAsync:member(1)' + package: outlook! + fullName: 'addAsync(key, JSONmessage, options, callback)' + summary: >- + Adds a notification to an item. + + + There are a maximum of 5 notifications per message. Setting more will return a + `NumberOfNotificationMessagesExceeded` error. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - Only one notification of type + [InsightMessage](https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields) + is allowed per add-in. Attempting to add more will throw an error. + + + - In modern Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can add an + `InsightMessage` notification only in Compose mode. + + + - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml + + + // Adds a progress indicator to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ProgressIndicator, + message: "Progress indicator with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an informational notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Non-persistent informational notification message with id = " + id, + icon: "icon1", + persistent: false + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds a persistent information notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Persistent informational notification message with id = " + id, + icon: "icon1", + persistent: true + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + + ... + + + // Adds an error notification to the mail item. + + const id = $("#notificationId").val().toString(); + + const details = + { + type: Office.MailboxEnums.ItemNotificationMessageType.ErrorMessage, + message: "Error notification message with id = " + id + }; + Office.context.mailbox.item.notificationMessages.addAsync(id, details, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: key + description: >- + A developer-specified key used to reference this notification message. Developers can use it to modify this + message later. It can't be longer than 32 characters. + type: string + - id: JSONmessage + description: >- + A JSON object that contains the notification message to be added to the item. It contains a + `NotificationMessageDetails` object. + type: '' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addAsync(key, JSONmessage, callback)' + uid: 'outlook!Office.NotificationMessages#addAsync:member(2)' + package: outlook! + fullName: 'addAsync(key, JSONmessage, callback)' + summary: >- + Adds a notification to an item. + + + There are a maximum of 5 notifications per message. Setting more will return a + `NumberOfNotificationMessagesExceeded` error. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + **Important**: + + + - Only one notification of type + [InsightMessage](https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields) + is allowed per add-in. Attempting to add more will throw an error. + + + - In modern Outlook on the web and [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), you can add an + `InsightMessage` notification only in Compose mode. + + + - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: key + description: >- + A developer-specified key used to reference this notification message. Developers can use it to modify this + message later. It can't be longer than 32 characters. + type: string + - id: JSONmessage + description: >- + A JSON object that contains the notification message to be added to the item. It contains a + `NotificationMessageDetails` object. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAllAsync(options, callback)' + uid: 'outlook!Office.NotificationMessages#getAllAsync:member(1)' + package: outlook! + fullName: 'getAllAsync(options, callback)' + summary: Returns all keys and messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/35-notifications/add-getall-remove.yaml + + + // Gets all the notification messages and their keys for the current mail item. + + Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + console.log(asyncResult.value); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAllAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. The `value` property of the result is an array of + `NotificationMessageDetails` objects. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAllAsync(callback) + uid: 'outlook!Office.NotificationMessages#getAllAsync:member(2)' + package: outlook! + fullName: getAllAsync(callback) + summary: Returns all keys and messages for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAllAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. The `value` property of the result is an array of + `NotificationMessageDetails` objects. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'removeAsync(key, options, callback)' + uid: 'outlook!Office.NotificationMessages#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(key, options, callback)' + summary: Removes a notification message for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/35-notifications/add-getall-remove.yaml + + + // Removes a notification message from the current mail item. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.removeAsync(id, handleResult); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(key: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: key + description: The key for the notification message to remove. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(key, callback)' + uid: 'outlook!Office.NotificationMessages#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(key, callback)' + summary: Removes a notification message for an item. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'removeAsync(key: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: key + description: The key for the notification message to remove. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'replaceAsync(key, JSONmessage, options, callback)' + uid: 'outlook!Office.NotificationMessages#replaceAsync:member(1)' + package: outlook! + fullName: 'replaceAsync(key, JSONmessage, options, callback)' + summary: |- + Replaces a notification message that has a given key with another message. + + If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/35-notifications/add-getall-remove.yaml + + + // Replaces a notification message of a given key with another message. + + const id = $("#notificationId").val().toString(); + + Office.context.mailbox.item.notificationMessages.replaceAsync( + id, + { + type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage, + message: "Notification message with id = " + id + " has been replaced with an informational message.", + icon: "icon2", + persistent: false + }, + handleResult); + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: key + description: The key for the notification message to replace. It can't be longer than 32 characters. + type: string + - id: JSONmessage + description: >- + A JSON object that contains the new notification message to replace the existing message. It contains a + `NotificationMessageDetails` object. + type: '' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'replaceAsync(key, JSONmessage, callback)' + uid: 'outlook!Office.NotificationMessages#replaceAsync:member(2)' + package: outlook! + fullName: 'replaceAsync(key, JSONmessage, callback)' + summary: |- + Replaces a notification message that has a given key with another message. + + If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. + remarks: >- + \[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: >- + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: key + description: The key for the notification message to replace. It can't be longer than 32 characters. + type: string + - id: JSONmessage + description: >- + A JSON object that contains the new notification message to replace the existing message. It contains a + `NotificationMessageDetails` object. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.officethemechangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.officethemechangedeventargs.yml new file mode 100644 index 0000000000..241a6b8046 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.officethemechangedeventargs.yml @@ -0,0 +1,65 @@ +### YamlMime:TSType +name: Office.OfficeThemeChangedEventArgs +uid: 'outlook!Office.OfficeThemeChangedEventArgs:interface' +package: outlook! +fullName: Office.OfficeThemeChangedEventArgs +summary: Provides the updated Office theme that raised the `Office.EventType.OfficeThemeChanged` event. +remarks: |- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Adds an event handler for the OfficeThemeChanged event. + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.OfficeThemeChanged, officeThemeChangedHandler, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Failed to add event handler: ${asyncResult.error.message}`); + return; + } + + console.log("Event handler added successfully."); + }); + }); + }); + + // Handles the OfficeThemeChanged event. + function officeThemeChangedHandler(event) { + console.log(`Event: ${event.type}`); + const currentTheme = event.officeTheme; + // Perform operations based on the current theme. + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: officeTheme + uid: 'outlook!Office.OfficeThemeChangedEventArgs#officeTheme:member' + package: outlook! + fullName: officeTheme + summary: Gets the updated Office theme. + remarks: '\[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'officeTheme: Office.OfficeTheme;' + return: + type: '' + - name: type + uid: 'outlook!Office.OfficeThemeChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "officeThemeChanged";' + return: + type: '"officeThemeChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.organizer.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.organizer.yml new file mode 100644 index 0000000000..29649361e5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.organizer.yml @@ -0,0 +1,132 @@ +### YamlMime:TSType +name: Office.Organizer +uid: 'outlook!Office.Organizer:interface' +package: outlook! +fullName: Office.Organizer +summary: >- + Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. This object + provides a method to get the organizer value of an appointment in an Outlook add-in. +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Organizer#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the organizer value of an appointment as an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object in the `asyncResult.value` + property. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: A `recipientType` property value isn't returned by the getAsync method. The appointment + organizer is always a user whose email address is on the Exchange server. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-organizer-appointment-organizer.yaml + + + Office.context.mailbox.item.organizer.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptOrganizer = asyncResult.value; + console.log("Organizer: " + apptOrganizer.displayName + " (" + apptOrganizer.emailAddress + ")"); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is + the appointment's organizer value, as an `EmailAddressDetails` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Organizer#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the organizer value of an appointment as an + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object in the `asyncResult.value` + property. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: A `recipientType` property value isn't returned by the getAsync method. The appointment + organizer is always a user whose email address is on the Exchange server. + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is + the appointment's organizer value, as an `EmailAddressDetails` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.phonenumber.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.phonenumber.yml new file mode 100644 index 0000000000..317f0125a3 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.phonenumber.yml @@ -0,0 +1,123 @@ +### YamlMime:TSType +name: Office.PhoneNumber +uid: 'outlook!Office.PhoneNumber:interface' +package: outlook! +fullName: Office.PhoneNumber +summary: >- + Represents a phone number identified in an item. Read mode only. + + + An array of `PhoneNumber` objects containing the phone numbers found in an email message is returned in the + `phoneNumbers` property of the `Entities` object that's returned when you call the `getEntities` method on the + selected item. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + #### Examples + + + ```TypeScript + + const item = Office.context.mailbox.item; + + // Get an array of strings that represent phone numbers in the current item's body. + + const phoneNumbers = item.getEntitiesByType(Office.MailboxEnums.EntityType.PhoneNumber); + + console.log("There are " + phoneNumbers.length + " phone numbers.") + + phoneNumbers.forEach(function (phoneNumber) { + console.log("Phone number: " + JSON.stringify(phoneNumber.phoneString)); + console.log("Type: " + JSON.stringify(phoneNumber.type)); + console.log("Source text: " + JSON.stringify(phoneNumber.originalPhoneString)); + }); + + ``` +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +type: interface +properties: + - name: originalPhoneString + uid: 'outlook!Office.PhoneNumber#originalPhoneString:member' + package: outlook! + fullName: originalPhoneString + summary: >- + Gets the text that was identified in an item as a phone number. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'originalPhoneString: string;' + return: + type: string + - name: phoneString + uid: 'outlook!Office.PhoneNumber#phoneString:member' + package: outlook! + fullName: phoneString + summary: >- + Gets a string containing a phone number. This string contains only the digits of the telephone number and excludes + characters like parentheses and hyphens, if they exist in the original item. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'phoneString: string;' + return: + type: string + - name: type + uid: 'outlook!Office.PhoneNumber#type:member' + package: outlook! + fullName: type + summary: >- + Gets a string that identifies the type of phone number: Home, Work, Mobile, Unspecified. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'type: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipients.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipients.yml new file mode 100644 index 0000000000..54cd48c7bf --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipients.yml @@ -0,0 +1,735 @@ +### YamlMime:TSType +name: Office.Recipients +uid: 'outlook!Office.Recipients:interface' +package: outlook! +fullName: Office.Recipients +summary: Represents recipients of an item. Compose mode only. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'addAsync(recipients, options, callback)' + uid: 'outlook!Office.Recipients#addAsync:member(1)' + package: outlook! + fullName: 'addAsync(recipients, options, callback)' + summary: Adds a recipient list to the existing recipients for an appointment or message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook + on the web, on Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and + classic), on Mac (classic UI), on Android, and on iOS. However, take note of the following: + + + - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 + recipients in a target field. If you need to add more than 100 recipients to a mail item, you can call `addAsync` + repeatedly, but be mindful of the recipient limit of the field. + + + - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the + Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook + JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + + + **Errors**: + + + - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + + + #### Examples + + + ```TypeScript + + // The following example creates an array of EmailUser objects + + // and adds them to the To recipients of the message. + + const newRecipients = [ + { + "displayName": "Allie Bellew", + "emailAddress": "allieb@contoso.com" + }, + { + "displayName": "Alex Darrow", + "emailAddress": "alexd@contoso.com" + } + ]; + + + Office.context.mailbox.item.to.addAsync(newRecipients, function(result) { + if (result.error) { + console.log(result.error); + } else { + console.log("Recipients added"); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(recipients: Array, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: recipients + description: >- + The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email + addresses, [EmailUser](xref:outlook!Office.EmailUser:interface) objects, or + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + Array<string | | > + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'addAsync(recipients, callback)' + uid: 'outlook!Office.Recipients#addAsync:member(2)' + package: outlook! + fullName: 'addAsync(recipients, callback)' + summary: Adds a recipient list to the existing recipients for an appointment or message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook + on the web, on Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and + classic), on Mac (classic UI), on Android, and on iOS. However, take note of the following: + + + - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 + recipients in a target field. If you need to add more than 100 recipients to a mail item, you can call `addAsync` + repeatedly, but be mindful of the recipient limit of the field. + + + - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the + Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook + JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + + + **Errors**: + + + - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + isPreview: false + isDeprecated: false + syntax: + content: >- + addAsync(recipients: Array, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: recipients + description: >- + The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email + addresses, [EmailUser](xref:outlook!Office.EmailUser:interface) objects, or + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + Array<string | | > + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Recipients#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets a recipient list for an appointment or message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + The maximum number of recipients returned by this method varies per Outlook client. + + + - Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), web + browser, Mac (classic UI): 500 recipients + + + - Android, iOS: 100 recipients + + + - Mac (new UI): No limit + + + In classic Outlook on Windows, the appointment organizer is included in the object returned by the `getAsync` + method when you create a new appointment or edit an existing one. In Outlook on the web and new Outlook on + Windows, the organizer is only included in the returned object when you edit an existing appointment. + + + The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the + following characteristics. + + + - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the + recipient's saved display name. + + + - A Teams meeting status icon appears before the recipient's name or email address. + + + - A semicolon appears after the recipient's name or email address. + + + - The recipient's name or email address is underlined or enclosed in a box. + + + To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a + suggested contact or email address from the auto-complete list. + + + In Outlook on the web and on Windows (new and classic), if a user creates a new message by activating a contact's + email address link from their contact or profile card, your add-in's `Recipients.getAsync` call returns the + contact's email address in the `displayName` property of the associated + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object instead of the contact's saved + name. For more details, see [related GitHub issue](https://github.com/OfficeDev/office-js/issues/2201). + + + While composing a mail item, when you switch to a sender account that's on a different domain than that of the + previously selected sender account, the value of the `recipientType` property for existing recipients isn't + updated and will still be based on the domain of the previously selected account. To get the correct recipient + types after switching accounts, you must first remove the existing recipients, then add them back to the mail + item. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. The `asyncResult.value` property of + the result is an array of [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Recipients#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets a recipient list for an appointment or message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + The maximum number of recipients returned by this method varies per Outlook client. + + + - Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), web + browser, Mac (classic UI): 500 recipients + + + - Android, iOS: 100 recipients + + + - Mac (new UI): No limit + + + The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the + following characteristics. + + + - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the + recipient's saved display name. + + + - A Teams meeting status icon appears before the recipient's name or email address. + + + - A semicolon appears after the recipient's name or email address. + + + - The recipient's name or email address is underlined or enclosed in a box. + + + To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a + suggested contact or email address from the auto-complete list. + + + In Outlook on the web and on Windows (new and classic), if a user creates a new message by activating a contact's + email address link from their contact or profile card, your add-in's `Recipients.getAsync` call returns the + contact's email address in the `displayName` property of the associated + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) object instead of the contact's saved + name. For more details, see [related GitHub issue](https://github.com/OfficeDev/office-js/issues/2201). + + + While composing a mail item, when you switch to a sender account that's on a different domain than that of the + previously selected sender account, the value of the `recipientType` property for existing recipients isn't + updated and will still be based on the domain of the previously selected account. To get the correct recipient + types after switching accounts, you must first remove the existing recipients, then add them back to the mail + item. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-bcc-message-compose.yaml + + + Office.context.mailbox.item.bcc.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgBcc = asyncResult.value; + console.log("Message being blind-copied to:"); + for (let i = 0; i < msgBcc.length; i++) { + console.log(msgBcc[i].displayName + " (" + msgBcc[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.cc.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgCc = asyncResult.value; + console.log("Message being copied to:"); + for (let i = 0; i < msgCc.length; i++) { + console.log(msgCc[i].displayName + " (" + msgCc[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.optionalAttendees.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptOptionalAttendees = asyncResult.value; + for (let i = 0; i < apptOptionalAttendees.length; i++) { + console.log( + "Optional attendees: " + + apptOptionalAttendees[i].displayName + + " (" + + apptOptionalAttendees[i].emailAddress + + ") - response: " + + apptOptionalAttendees[i].appointmentResponse + ); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.requiredAttendees.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const apptRequiredAttendees = asyncResult.value; + for (let i = 0; i < apptRequiredAttendees.length; i++) { + console.log( + "Required attendees: " + + apptRequiredAttendees[i].displayName + + " (" + + apptRequiredAttendees[i].emailAddress + + ") - response: " + + apptRequiredAttendees[i].appointmentResponse + ); + } + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + Office.context.mailbox.item.to.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const msgTo = asyncResult.value; + console.log("Message being sent to:"); + for (let i = 0; i < msgTo.length; i++) { + console.log(msgTo[i].displayName + " (" + msgTo[i].emailAddress + ")"); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, of type `Office.AsyncResult`. The `asyncResult.value` property of + the result is an array of [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'setAsync(recipients, options, callback)' + uid: 'outlook!Office.Recipients#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(recipients, options, callback)' + summary: |- + Sets a recipient list for an appointment or message. + + The `setAsync` method overwrites the current recipient list. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on + Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), on Mac + (classic UI), on Android, and on iOS. However, take note of the following: + + + - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 + recipients in a target field. If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but + be mindful of the recipient limit of the field. + + + - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the + Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook + JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + + + **Errors**: + + + - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(recipients: Array, options: Office.AsyncContextOptions, + callback: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: recipients + description: >- + The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email + addresses, [EmailUser](xref:outlook!Office.EmailUser:interface) objects, or + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + Array<string | | > + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will + contain a code that indicates any error that occurred while adding the data. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(recipients, callback)' + uid: 'outlook!Office.Recipients#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(recipients, callback)' + summary: |- + Sets a recipient list for an appointment or message. + + The `setAsync` method overwrites the current recipient list. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on + Windows ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic), on Mac + (classic UI), on Android, and on iOS. However, take note of the following: + + + - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 + recipients in a target field. If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but + be mindful of the recipient limit of the field. + + + - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the + Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see [Outlook + JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + + + **Errors**: + + + - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + + + #### Examples + + + ```TypeScript + + // The following example creates an array of EmailUser objects and + + // replaces the CC recipients of the message with the array. + + const newRecipients = [ + { + "displayName": "Allie Bellew", + "emailAddress": "allieb@contoso.com" + }, + { + "displayName": "Alex Darrow", + "emailAddress": "alexd@contoso.com" + } + ]; + + + Office.context.mailbox.item.cc.setAsync(newRecipients, function(result) { + if (result.error) { + console.log(result.error); + } else { + console.log("Recipients overwritten"); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-set-bcc-message-compose.yaml + + + const email = $("#emailBcc") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.bcc.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting Bcc field."); + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailCc") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.cc.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting Cc field."); + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailOptional") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.optionalAttendees.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting optional attendees field."); + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailRequired") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.requiredAttendees.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting required attendees field."); + } else { + console.error(asyncResult.error); + } + }); + + + ... + + + const email = $("#emailTo") + .val() + .toString(); + const emailArray = [email]; + + Office.context.mailbox.item.to.setAsync(emailArray, function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Succeeded in setting To field."); + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(recipients: Array, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: recipients + description: >- + The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email + addresses, [EmailUser](xref:outlook!Office.EmailUser:interface) objects, or + [EmailAddressDetails](xref:outlook!Office.EmailAddressDetails:interface) objects. + type: >- + Array<string | | > + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will + contain a code that indicates any error that occurred while adding the data. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedeventargs.yml new file mode 100644 index 0000000000..1d06fda73f --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedeventargs.yml @@ -0,0 +1,54 @@ +### YamlMime:TSType +name: Office.RecipientsChangedEventArgs +uid: 'outlook!Office.RecipientsChangedEventArgs:interface' +package: outlook! +fullName: Office.RecipientsChangedEventArgs +summary: Provides change status of recipients fields when the `Office.EventType.RecipientsChanged` event is raised. +remarks: |- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Handles the OnMessageRecipientsChanged event. + function onMessageRecipientsChangedHandler(event) { + console.log(`Event: ${event.type}`); + const recipientFields = event.changedRecipientFields; + console.log(getChangedRecipientFields(recipientFields)); + } + + // Gets the recipient fields that have changed. + function getChangedRecipientFields(recipientFields) { + return Object.keys(recipientFields).filter((key) => recipientFields[key] === true); + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: changedRecipientFields + uid: 'outlook!Office.RecipientsChangedEventArgs#changedRecipientFields:member' + package: outlook! + fullName: changedRecipientFields + summary: Gets an object that indicates change state of recipients fields. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'changedRecipientFields: RecipientsChangedFields;' + return: + type: '' + - name: type + uid: 'outlook!Office.RecipientsChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkRecipientsChanged";' + return: + type: '"olkRecipientsChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedfields.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedfields.yml new file mode 100644 index 0000000000..625db4c0cf --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recipientschangedfields.yml @@ -0,0 +1,104 @@ +### YamlMime:TSType +name: Office.RecipientsChangedFields +uid: 'outlook!Office.RecipientsChangedFields:interface' +package: outlook! +fullName: Office.RecipientsChangedFields +summary: Represents `RecipientsChangedEventArgs.changedRecipientFields` object. +remarks: |- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Handles the OnMessageRecipientsChanged event. + function onMessageRecipientsChangedHandler(event) { + console.log(`Event: ${event.type}`); + const recipientFields = event.changedRecipientFields; + const changedFields = getChangedRecipientFields(recipientFields); + + if (changedFields.includes("to")) { + // Perform operations based on the updated recipients in the To field. + } + } + + // Gets the recipient fields that have changed. + function getChangedRecipientFields(recipientFields) { + return Object.keys(recipientFields).filter((key) => recipientFields[key] === true); + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: bcc + uid: 'outlook!Office.RecipientsChangedFields#bcc:member' + package: outlook! + fullName: bcc + summary: Gets if recipients in the **bcc** field were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'bcc: boolean' + return: + type: boolean + - name: cc + uid: 'outlook!Office.RecipientsChangedFields#cc:member' + package: outlook! + fullName: cc + summary: Gets if recipients in the **cc** field were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'cc: boolean;' + return: + type: boolean + - name: optionalAttendees + uid: 'outlook!Office.RecipientsChangedFields#optionalAttendees:member' + package: outlook! + fullName: optionalAttendees + summary: Gets if optional attendees were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'optionalAttendees: boolean;' + return: + type: boolean + - name: requiredAttendees + uid: 'outlook!Office.RecipientsChangedFields#requiredAttendees:member' + package: outlook! + fullName: requiredAttendees + summary: Gets if required attendees were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'requiredAttendees: boolean;' + return: + type: boolean + - name: resources + uid: 'outlook!Office.RecipientsChangedFields#resources:member' + package: outlook! + fullName: resources + summary: Gets if resources were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'resources: boolean;' + return: + type: boolean + - name: to + uid: 'outlook!Office.RecipientsChangedFields#to:member' + package: outlook! + fullName: to + summary: Gets if recipients in the **to** field were changed. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'to: boolean;' + return: + type: boolean diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrence.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrence.yml new file mode 100644 index 0000000000..1b7b1b21d6 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrence.yml @@ -0,0 +1,386 @@ +### YamlMime:TSType +name: Office.Recurrence +uid: 'outlook!Office.Recurrence:interface' +package: outlook! +fullName: Office.Recurrence +summary: >- + The `Recurrence` object provides methods to get and set the recurrence pattern of appointments but only get the + recurrence pattern of meeting requests. It will have a dictionary with the following keys: `seriesTime`, + `recurrenceType`, `recurrenceProperties`, and `recurrenceTimeZone` (optional). +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + **States** + + +
State Editable? Viewable?
Appointment Organizer - Compose + Series Yes (setAsync) Yes (getAsync)
Appointment Organizer - Compose + Instance No (setAsync returns error) Yes (getAsync)
Appointment Attendee - Read + Series No (setAsync not available) Yes (item.recurrence)
Appointment Attendee - + Read Instance No (setAsync not available) Yes (item.recurrence)
Meeting Request + - Read Series No (setAsync not available) Yes (item.recurrence)
Meeting Request + - Read Instance No (setAsync not available) Yes (item.recurrence)
+isPreview: false +isDeprecated: false +type: interface +properties: + - name: recurrenceProperties + uid: 'outlook!Office.Recurrence#recurrenceProperties:member' + package: outlook! + fullName: recurrenceProperties + summary: Gets or sets the properties of the recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'recurrenceProperties?: RecurrenceProperties;' + return: + type: '' + - name: recurrenceTimeZone + uid: 'outlook!Office.Recurrence#recurrenceTimeZone:member' + package: outlook! + fullName: recurrenceTimeZone + summary: Gets or sets the properties of the recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'recurrenceTimeZone?: RecurrenceTimeZone;' + return: + type: '' + - name: recurrenceType + uid: 'outlook!Office.Recurrence#recurrenceType:member' + package: outlook! + fullName: recurrenceType + summary: Gets or sets the type of the recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'recurrenceType: MailboxEnums.RecurrenceType | string;' + return: + type: ' | string' + - name: seriesTime + uid: 'outlook!Office.Recurrence#seriesTime:member' + package: outlook! + fullName: seriesTime + summary: >- + The [SeriesTime](xref:outlook!Office.SeriesTime:interface) object enables you to manage the start and end dates of + the recurring appointment series and the usual start and end times of instances. **This object is not in UTC + time.** Instead, it is set in the time zone specified by the `recurrenceTimeZone` value or defaulted to the + item's time zone. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'seriesTime: SeriesTime;' + return: + type: '' +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Recurrence#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: |- + Returns the current recurrence object of an appointment series. + + This method returns the entire `Recurrence` object for the appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[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/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + Office.context.mailbox.item.recurrence.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const recurrence = asyncResult.value; + if (recurrence === null) { + console.log("This is a single appointment."); + } else { + console.log(`Recurrence pattern: ${JSON.stringify(recurrence)}`); + } + } else { + console.error(asyncResult.error); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the + result is a `Recurrence` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Recurrence#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: |- + Returns the current recurrence object of an appointment series. + + This method returns the entire `Recurrence` object for the appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the + result is a `Recurrence` object. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'setAsync(recurrencePattern, options, callback)' + uid: 'outlook!Office.Recurrence#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(recurrencePattern, options, callback)' + summary: |- + Sets the recurrence pattern of an appointment series. + + **Note**: `setAsync` should only be available for series items and not instance items. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidEndTime`: The appointment end time is before its start time. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/50-recurrence/get-set-recurrence-appointment-organizer.yaml + + + // Important: Can only set the recurrence pattern of an appointment series. + + + const currentDate = new Date(); + + let seriesTimeObject: Office.SeriesTime; + + // Set series start date to tomorrow. + + seriesTimeObject.setStartDate(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDay() + 1); + + // Set series end date to one year from now. + + seriesTimeObject.setEndDate(currentDate.getFullYear() + 1, currentDate.getMonth() + 1, currentDate.getDay()); + + // Set start time to 1:30 PM. + + seriesTimeObject.setStartTime(13, 30); + + // Set duration to 30 minutes. + + seriesTimeObject.setDuration(30); + + + const pattern: Office.Recurrence = { + seriesTime: seriesTimeObject, + recurrenceType: Office.MailboxEnums.RecurrenceType.Yearly, + recurrenceProperties: { + interval: 1, + dayOfWeek: Office.MailboxEnums.Days.Tue, + weekNumber: Office.MailboxEnums.WeekNumber.Second, + month: Office.MailboxEnums.Month.Sep + }, + recurrenceTimeZone: { name: Office.MailboxEnums.RecurrenceTimeZone.PacificStandardTime } + }; + + + Office.context.mailbox.item.recurrence.setAsync(pattern, (asyncResult) => { + if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Failed to set recurrence. Error: ${asyncResult.error.message}`); + return; + } + console.log(`Succeeded in setting recurrence pattern ${JSON.stringify(pattern)}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(recurrencePattern: Recurrence, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: recurrencePattern + description: A recurrence object. + type: '' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(recurrencePattern, callback)' + uid: 'outlook!Office.Recurrence#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(recurrencePattern, callback)' + summary: |- + Sets the recurrence pattern of an appointment series. + + **Note**: `setAsync` should only be available for series items and not instance items. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidEndTime`: The appointment end time is before its start time. + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(recurrencePattern: Recurrence, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: recurrencePattern + description: A recurrence object. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencechangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencechangedeventargs.yml new file mode 100644 index 0000000000..07a513ba64 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencechangedeventargs.yml @@ -0,0 +1,66 @@ +### YamlMime:TSType +name: Office.RecurrenceChangedEventArgs +uid: 'outlook!Office.RecurrenceChangedEventArgs:interface' +package: outlook! +fullName: Office.RecurrenceChangedEventArgs +summary: Provides updated recurrence object that raised the `Office.EventType.RecurrenceChanged` event. +remarks: |- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // Adds an event handler for the RecurrenceChanged event. + Office.onReady(() => { + document.addEventListener('DOMContentLoaded', () => { + // Get a reference to the mailbox and use it to add an event handler. + const mailbox = Office.context.mailbox; + mailbox.addHandlerAsync(Office.EventType.RecurrenceChanged, recurrenceChangedHandler, (result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error(`Failed to add event handler: ${asyncResult.error.message}`); + return; + } + + console.log("Event handler added successfully."); + }); + }); + }); + + // Handles the RecurrenceChanged event. + function recurrenceChangedHandler(event) { + console.log(`Event: ${event.type}`); + const recurrence = event.recurrence; + + // Perform operations based on the updated recurrence. + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: recurrence + uid: 'outlook!Office.RecurrenceChangedEventArgs#recurrence:member' + package: outlook! + fullName: recurrence + summary: Gets the updated recurrence object. + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'recurrence: Recurrence;' + return: + type: '' + - name: type + uid: 'outlook!Office.RecurrenceChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + Gets the type of the event. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkRecurrenceChanged";' + return: + type: '"olkRecurrenceChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrenceproperties.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrenceproperties.yml new file mode 100644 index 0000000000..d3eec4f62a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrenceproperties.yml @@ -0,0 +1,149 @@ +### YamlMime:TSType +name: Office.RecurrenceProperties +uid: 'outlook!Office.RecurrenceProperties:interface' +package: outlook! +fullName: Office.RecurrenceProperties +summary: Represents the properties of the recurrence. +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the Recurrence object of an appointment item. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + if (!recurrence) { + console.log("One-time appointment or meeting"); + } else { + console.log(JSON.stringify(recurrence)); + } + } + + + // The following example shows the results of the getAsync call that retrieves the recurrence for a series. + + // NOTE: In this example, seriesTimeObject is a placeholder for the JSON representing the + + // recurrence.seriesTime property. You should use the SeriesTime object's methods to get the + + // recurrence date and time properties. + + Recurrence = { + "recurrenceType": "weekly", + "recurrenceProperties": {"interval": 2, "days": ["mon","thu","fri"], "firstDayOfWeek": "sun"}, + "seriesTime": {seriesTimeObject}, + "recurrenceTimeZone": {"name": "Pacific Standard Time", "offset": -480} + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: dayOfMonth + uid: 'outlook!Office.RecurrenceProperties#dayOfMonth:member' + package: outlook! + fullName: dayOfMonth + summary: Represents the day of the month. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'dayOfMonth?: number;' + return: + type: number + - name: dayOfWeek + uid: 'outlook!Office.RecurrenceProperties#dayOfWeek:member' + package: outlook! + fullName: dayOfWeek + summary: 'Represents the day of the week or type of day, for example, weekend day vs weekday.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'dayOfWeek?: MailboxEnums.Days | string;' + return: + type: ' | string' + - name: days + uid: 'outlook!Office.RecurrenceProperties#days:member' + package: outlook! + fullName: days + summary: >- + Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and + 'Sun'. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'days?: MailboxEnums.Days[] | string[];' + return: + type: '[] | string[]' + - name: firstDayOfWeek + uid: 'outlook!Office.RecurrenceProperties#firstDayOfWeek:member' + package: outlook! + fullName: firstDayOfWeek + summary: >- + Represents your chosen first day of the week otherwise the default is the value in the current user's settings. + Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'firstDayOfWeek?: MailboxEnums.Days | string;' + return: + type: ' | string' + - name: interval + uid: 'outlook!Office.RecurrenceProperties#interval:member' + package: outlook! + fullName: interval + summary: Represents the period between instances of the same recurring series. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'interval: number;' + return: + type: number + - name: month + uid: 'outlook!Office.RecurrenceProperties#month:member' + package: outlook! + fullName: month + summary: Represents the month. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'month?: MailboxEnums.Month | string;' + return: + type: ' | string' + - name: weekNumber + uid: 'outlook!Office.RecurrenceProperties#weekNumber:member' + package: outlook! + fullName: weekNumber + summary: 'Represents the number of the week in the selected month e.g., ''first'' for first week of the month.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'weekNumber?: MailboxEnums.WeekNumber | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencetimezone.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencetimezone.yml new file mode 100644 index 0000000000..3fc3e0fea6 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.recurrencetimezone.yml @@ -0,0 +1,88 @@ +### YamlMime:TSType +name: Office.RecurrenceTimeZone +uid: 'outlook!Office.RecurrenceTimeZone:interface' +package: outlook! +fullName: Office.RecurrenceTimeZone +summary: Represents the time zone of the recurrence. +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the Recurrence object of an appointment item. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + if (!recurrence) { + //if (recurrence == null) { + console.log("One-time appointment or meeting"); + } else { + console.log(JSON.stringify(recurrence)); + } + } + + + // The following example shows the results of the getAsync call that retrieves the recurrence for a series. + + // NOTE: In this example, seriesTimeObject is a placeholder for the JSON representing the + + // recurrence.seriesTime property. You should use the SeriesTime object's methods to get the + + // recurrence date and time properties. + + Recurrence = { + "recurrenceType": "weekly", + "recurrenceProperties": {"interval": 2, "days": ["mon","thu","fri"], "firstDayOfWeek": "sun"}, + "seriesTime": {seriesTimeObject}, + "recurrenceTimeZone": {"name": "Pacific Standard Time", "offset": -480} + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: name + uid: 'outlook!Office.RecurrenceTimeZone#name:member' + package: outlook! + fullName: name + summary: Represents the name of the recurrence time zone. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'name: MailboxEnums.RecurrenceTimeZone | string;' + return: + type: ' | string' + - name: offset + uid: 'outlook!Office.RecurrenceTimeZone#offset:member' + package: outlook! + fullName: offset + summary: >- + Integer value representing the difference in minutes between the local time zone and UTC at the date that the + meeting series began. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'offset?: number;' + return: + type: number diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformattachment.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformattachment.yml new file mode 100644 index 0000000000..e68c998d85 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformattachment.yml @@ -0,0 +1,108 @@ +### YamlMime:TSType +name: Office.ReplyFormAttachment +uid: 'outlook!Office.ReplyFormAttachment:interface' +package: outlook! +fullName: Office.ReplyFormAttachment +summary: A file or item attachment. Used when displaying a reply form. +remarks: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-with-attachments.yaml + + + // The async version is only available starting with requirement set 1.9. + + // It provides a callback when the new appointment form has been created. + + Office.context.mailbox.item.displayReplyFormAsync( + { + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "http://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ] + }, + (asyncResult) => { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: inLine + uid: 'outlook!Office.ReplyFormAttachment#inLine:member' + package: outlook! + fullName: inLine + summary: >- + Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, + and should not be displayed in the attachment list. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'inLine?: boolean;' + return: + type: boolean + - name: itemId + uid: 'outlook!Office.ReplyFormAttachment#itemId:member' + package: outlook! + fullName: itemId + summary: Only used if type is set to item. The EWS item ID of the attachment. This is a string up to 100 characters. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'itemId?: string;' + return: + type: string + - name: name + uid: 'outlook!Office.ReplyFormAttachment#name:member' + package: outlook! + fullName: name + summary: 'A string that contains the name of the attachment, up to 255 characters in length.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'name: string;' + return: + type: string + - name: type + uid: 'outlook!Office.ReplyFormAttachment#type:member' + package: outlook! + fullName: type + summary: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'type: string;' + return: + type: string + - name: url + uid: 'outlook!Office.ReplyFormAttachment#url:member' + package: outlook! + fullName: url + summary: >- + Only used if type is set to file. The URI of the location for the file. + + + **Important**: This link must be publicly accessible, without need for authentication by Exchange Online + servers. However, with on-premises Exchange, the link can be accessible on a private network as long as it doesn't + need further authentication. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'url?: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformdata.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformdata.yml new file mode 100644 index 0000000000..fec7a3f2a7 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.replyformdata.yml @@ -0,0 +1,98 @@ +### YamlMime:TSType +name: Office.ReplyFormData +uid: 'outlook!Office.ReplyFormData:interface' +package: outlook! +fullName: Office.ReplyFormData +summary: >- + A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply + form. +remarks: >- + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-reply-with-attachments.yaml + + + // The async version is only available starting with requirement set 1.9. + + // It provides a callback when the new appointment form has been created. + + Office.context.mailbox.item.displayReplyFormAsync( + { + htmlBody: "This is a reply with an inline image and an item attachment.
", + attachments: [ + { type: "file", url: "http://i.imgur.com/9S36xvA.jpg", name: "dog.jpg", inLine: true }, + { type: "item", itemId: Office.context.mailbox.item.itemId, name: "test_email.msg" } + ] + }, + (asyncResult) => { + console.log(JSON.stringify(asyncResult)); + } + ); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: attachments + uid: 'outlook!Office.ReplyFormData#attachments:member' + package: outlook! + fullName: attachments + summary: >- + An array of [ReplyFormAttachment](xref:outlook!Office.ReplyFormAttachment:interface) that are either file or item + attachments. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'attachments?: ReplyFormAttachment[];' + return: + type: '[]' + - name: callback + uid: 'outlook!Office.ReplyFormData#callback:member' + package: outlook! + fullName: callback + summary: >- + When the reply display call completes, the function passed in the callback parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'callback?: (asyncResult: Office.AsyncResult) => void;' + return: + type: '(asyncResult: <any>) => void' + - name: htmlBody + uid: 'outlook!Office.ReplyFormData#htmlBody:member' + package: outlook! + fullName: htmlBody + summary: >- + A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 + KB. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'htmlBody?: string;' + return: + type: string + - name: options + uid: 'outlook!Office.ReplyFormData#options:member' + package: outlook! + fullName: options + summary: >- + An object literal that contains the following property:- `asyncContext`: Developers can provide any object + they wish to access in the callback function. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'options?: Office.AsyncContextOptions;' + return: + type: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.roamingsettings.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.roamingsettings.yml new file mode 100644 index 0000000000..eb2a75104e --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.roamingsettings.yml @@ -0,0 +1,254 @@ +### YamlMime:TSType +name: Office.RoamingSettings +uid: 'outlook!Office.RoamingSettings:interface' +package: outlook! +fullName: Office.RoamingSettings +summary: >- + The settings created by using the methods of the `RoamingSettings` object are saved per add-in and per user. That is, + they are available only to the add-in that created them, and only from the user's mailbox in which they are saved. + + + While the Outlook add-in API limits access to these settings to only the add-in that created them, these settings + shouldn't be considered secure storage. They can be accessed by Exchange Web Services or Extended MAPI. They shouldn't + be used to store sensitive information, such as user credentials or security tokens. + + + The name of a setting is a String, while the value can be a String, Number, Boolean, null, Object, or Array. + + + The `RoamingSettings` object is accessible via the `roamingSettings` property in the `Office.context` namespace. + + + To learn more about `RoamingSettings`, see [Get and set add-in metadata for an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in). +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **Important**: + + + - The `RoamingSettings` object is initialized from the persisted storage only when the add-in is first loaded. For + task panes, this means that it's only initialized when the task pane first opens. If the task pane navigates to + another page or reloads the current page, the in-memory object is reset to its initial values, even if your add-in has + persisted changes. The persisted changes will not be available until the task pane (or item in the case of UI-less + add-ins) is closed and reopened. + + + - When set and saved through Outlook on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) or classic) or on Mac, these + settings are reflected in Outlook on the web only after a browser refresh. + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: get(name) + uid: 'outlook!Office.RoamingSettings#get:member(1)' + package: outlook! + fullName: get(name) + summary: Retrieves the specified setting. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[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/10-roaming-settings/roaming-settings.yaml + + + const settingName = $("#settingName").val(); + + const settingValue = Office.context.roamingSettings.get(settingName); + + $("#settingValue").val(settingValue); + + console.log(`The value of setting "${settingName}" is "${settingValue}".`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'get(name: string): any;' + parameters: + - id: name + description: The case-sensitive name of the setting to retrieve. + type: string + return: + type: any + description: 'Type: String \| Number \| Boolean \| Object \| Array' + - name: remove(name) + uid: 'outlook!Office.RoamingSettings#remove:member(1)' + package: outlook! + fullName: remove(name) + summary: Removes the specified setting. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + isPreview: false + isDeprecated: false + syntax: + content: 'remove(name: string): void;' + parameters: + - id: name + description: The case-sensitive name of the setting to remove. + type: string + return: + type: void + description: '' + - name: saveAsync(callback) + uid: 'outlook!Office.RoamingSettings#saveAsync:member(1)' + package: outlook! + fullName: saveAsync(callback) + summary: >- + Saves the settings. + + + Any settings previously saved by an add-in are loaded when it's initialized, so during the lifetime of the session + you can just use the set and get methods to work with the in-memory copy of the settings property bag. When you + want to persist the settings so that they're available the next time the add-in is used, use the `saveAsync` + method. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[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/10-roaming-settings/roaming-settings.yaml + + + // Save settings in the mailbox to make it available in future sessions. + + Office.context.roamingSettings.saveAsync(function(result) { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + } else { + console.log(`Settings saved with status: ${result.status}`); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'saveAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'set(name, value)' + uid: 'outlook!Office.RoamingSettings#set:member(1)' + package: outlook! + fullName: 'set(name, value)' + summary: >- + Sets or creates the specified setting. + + + The `set` method creates a new setting of the specified name if it doesn't already exist, or sets an existing + setting of the specified name. The value is stored in the document as the serialized JSON representation of its + data type. + + + A maximum of 32KB is available for the settings of each add-in. An error with code 9057 is thrown when that size + limit is exceeded. + + + Any changes made to settings using the `set` method will not be saved to the server until the `saveAsync` method + is called. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[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/10-roaming-settings/roaming-settings.yaml + + + const settingName = $("#settingName").val(); + + const settingValue = $("#settingValue").val(); + + Office.context.roamingSettings.set(settingName, settingValue); + + console.log(`Setting "${settingName}" set to value "${settingValue}".`); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'set(name: string, value: any): void;' + parameters: + - id: name + description: The case-sensitive name of the setting to set or create. + type: string + - id: value + description: Specifies the value to be stored. + type: any + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.selecteditemdetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.selecteditemdetails.yml new file mode 100644 index 0000000000..4f35e37690 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.selecteditemdetails.yml @@ -0,0 +1,214 @@ +### YamlMime:TSType +name: Office.SelectedItemDetails +uid: 'outlook!Office.SelectedItemDetails:interface' +package: outlook! +fullName: Office.SelectedItemDetails +summary: Represents the properties of a message that's currently selected in Outlook. +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Message Compose, Message Read + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-message-properties.yaml + + + // Retrieves the selected messages' properties and logs them to the console. + + Office.context.mailbox.getSelectedItemsAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + return; + } + + asyncResult.value.forEach((message) => { + console.log(`Item ID: ${message.itemId}`); + console.log(`Conversation ID: ${message.conversationId}`); + console.log(`Internet message ID: ${message.internetMessageId}`); + console.log(`Subject: ${message.subject}`); + console.log(`Item type: ${message.itemType}`); + console.log(`Item mode: ${message.itemMode}`); + console.log(`Has attachment: ${message.hasAttachment}`); + }); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: conversationId + uid: 'outlook!Office.SelectedItemDetails#conversationId:member' + package: outlook! + fullName: conversationId + summary: The identifier of the message conversation that contains the message that's currently selected. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'conversationId: string;' + return: + type: string + - name: hasAttachment + uid: 'outlook!Office.SelectedItemDetails#hasAttachment:member' + package: outlook! + fullName: hasAttachment + summary: Returns `true` if the message that's currently selected contains an attachment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'hasAttachment: boolean;' + return: + type: boolean + - name: internetMessageId + uid: 'outlook!Office.SelectedItemDetails#internetMessageId:member' + package: outlook! + fullName: internetMessageId + summary: The internet message identifier of the message that's currently selected. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'internetMessageId: string;' + return: + type: string + - name: itemId + uid: 'outlook!Office.SelectedItemDetails#itemId:member' + package: outlook! + fullName: itemId + summary: The Exchange Web Services (EWS) item identifier of the message that's currently selected. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'itemId: string;' + return: + type: string + - name: itemMode + uid: 'outlook!Office.SelectedItemDetails#itemMode:member' + package: outlook! + fullName: itemMode + summary: The Outlook mode (`Read` or `Compose`) of the message that's currently selected. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'itemMode: string;' + return: + type: string + - name: itemType + uid: 'outlook!Office.SelectedItemDetails#itemType:member' + package: outlook! + fullName: itemType + summary: The type of the item that's currently selected. `Message` is the only supported type at this time. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'itemType: MailboxEnums.ItemType | string;' + return: + type: ' | string' + - name: subject + uid: 'outlook!Office.SelectedItemDetails#subject:member' + package: outlook! + fullName: subject + summary: The description that appears in the subject field of the message that's currently selected. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write mailbox** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Compose, Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'subject: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivity.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivity.yml new file mode 100644 index 0000000000..9a787fb5be --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivity.yml @@ -0,0 +1,252 @@ +### YamlMime:TSType +name: Office.Sensitivity +uid: 'outlook!Office.Sensitivity:interface' +package: outlook! +fullName: Office.Sensitivity +summary: >- + Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see + [Mark your email as Normal, Personal, Private, or + Confidential](https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1). +remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Sensitivity#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets the sensitivity level of an appointment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. If you call `getAsync` on an appointment that has a + Confidential or Personal sensitivity level from these clients, the Normal sensitivity level is returned in the + `asyncResult.value` property. + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The sensitivity level of the + appointment is returned in the `asyncResult.value` property. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Sensitivity#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets the sensitivity level of an appointment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. If you call `getAsync` on an appointment that has a + Confidential or Personal sensitivity level from these clients, the Normal sensitivity level is returned in the + `asyncResult.value` property. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-sensitivity-level.yaml + + + Office.context.mailbox.item.sensitivity.getAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("Sensitivity: " + asyncResult.value); + } else { + console.log("Failed to get sensitivity: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The sensitivity level of the + appointment is returned in the `asyncResult.value` property. + type: >- + (asyncResult: <>) => void + return: + type: void + description: '' + - name: 'setAsync(sensitivity, options, callback)' + uid: 'outlook!Office.Sensitivity#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(sensitivity, options, callback)' + summary: Sets the sensitivity level of an appointment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. + + + **Errors**: + + + - `Unsupported API parameter`: Setting the sensitivity level of an appointment isn't supported. + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-sensitivity-level.yaml + + + Office.context.mailbox.item.sensitivity.setAsync( + Office.MailboxEnums.AppointmentSensitivityType.Private, + function callback(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log("Failed to set appointment sensitivity: " + JSON.stringify(asyncResult.error)); + } else { + console.log("Successfully set appointment sensitivity."); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: Office.AsyncContextOptions, + callback?: (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: sensitivity + description: The sensitivity level as an enum or string. + type: ' | string' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(sensitivity, callback)' + uid: 'outlook!Office.Sensitivity#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(sensitivity, callback)' + summary: Sets the sensitivity level of an appointment. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: Outlook on the web, [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627), and Outlook on Mac + only support Normal and Private sensitivity levels. + + + **Errors**: + + + - `Unsupported API parameter`: Setting the sensitivity level of an appointment isn't supported. + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: sensitivity + description: The sensitivity level as an enum or string. + type: ' | string' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabel.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabel.yml new file mode 100644 index 0000000000..ac41c76f35 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabel.yml @@ -0,0 +1,295 @@ +### YamlMime:TSType +name: Office.SensitivityLabel +uid: 'outlook!Office.SensitivityLabel:interface' +package: outlook! +fullName: Office.SensitivityLabel +summary: >- + Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity + labels, see [Learn about sensitivity + labels](https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels). +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your message + or appointment in compose mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.SensitivityLabel#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The sensitivity label's GUID is + returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.SensitivityLabel#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-label.yaml + + + // This snippet gets the current mail item's sensitivity label. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.mailbox.item.sensitivityLabel.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(asyncResult.value); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The sensitivity label's GUID is + returned in the `asyncResult.value` property. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'setAsync(sensitivityLabel, options, callback)' + uid: 'outlook!Office.SensitivityLabel#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(sensitivityLabel, options, callback)' + summary: Applies the specified sensitivity label to the message or appointment being composed. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + **Tip**: To determine the sensitivity labels available for use, call the + `Office.context.sensitivityLabelsCatalog.getAsync` method. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(sensitivityLabel: string | SensitivityLabelDetails, options: Office.AsyncContextOptions, callback?: + (asyncResult: Office.AsyncResult) => void): void; + parameters: + - id: sensitivityLabel + description: >- + The sensitivity label to be applied to the message or appointment being composed. The parameter value can be + a sensitivity label's unique identifier (GUID) or a + [SensitivityLabelDetails](xref:outlook!Office.SensitivityLabelDetails:interface) object. + type: 'string | ' + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(sensitivityLabel, callback)' + uid: 'outlook!Office.SensitivityLabel#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(sensitivityLabel, callback)' + summary: Applies the specified sensitivity label to the message or appointment being composed. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + **Tip**: To determine the sensitivity labels available for use, call the + `Office.context.sensitivityLabelsCatalog.getAsync` method. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-label.yaml + + + // This snippet sets the sensitivity label on the current mail item. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.sensitivityLabelsCatalog.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const catalog = asyncResult.value; + if (catalog.length > 0) { + var id = catalog[0].id; + Office.context.mailbox.item.sensitivityLabel.setAsync(id, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(asyncResult.status); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } + else { + console.log("Catalog list is empty"); + } + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: sensitivityLabel + description: >- + The sensitivity label to be applied to the message or appointment being composed. The parameter value can be + a sensitivity label's unique identifier (GUID) or a + [SensitivityLabelDetails](xref:outlook!Office.SensitivityLabelDetails:interface) object. + type: 'string | ' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelchangedeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelchangedeventargs.yml new file mode 100644 index 0000000000..c6e4d4766a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelchangedeventargs.yml @@ -0,0 +1,51 @@ +### YamlMime:TSType +name: Office.SensitivityLabelChangedEventArgs +uid: 'outlook!Office.SensitivityLabelChangedEventArgs:interface' +package: outlook! +fullName: Office.SensitivityLabelChangedEventArgs +summary: >- + Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This + information is provided when the `Office.EventType.SensitivityLabelChanged` event is raised. +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your message + or appointment in compose mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Handles a change to an item's sensitivity label. + + function onSensitivityLabelChangedHandler(event) { + console.log(`Event: ${event.type}`); + + // Perform operations based on the event. + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: type + uid: 'outlook!Office.SensitivityLabelChangedEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + The type of event that was raised. For details, refer to + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "olkSensitivityLabelChanged";' + return: + type: '"olkSensitivityLabelChanged"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabeldetails.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabeldetails.yml new file mode 100644 index 0000000000..63927f97c5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabeldetails.yml @@ -0,0 +1,126 @@ +### YamlMime:TSType +name: Office.SensitivityLabelDetails +uid: 'outlook!Office.SensitivityLabelDetails:interface' +package: outlook! +fullName: Office.SensitivityLabelDetails +summary: Represents the properties of available sensitivity labels in Outlook. +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your message + or appointment in compose mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Check whether the catalog of sensitivity labels is enabled on the current mailbox. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + // If the catalog is enabled, get all available sensitivity labels. + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.sensitivityLabelsCatalog.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const catalog = asyncResult.value; + console.log("Sensitivity Labels Catalog:"); + + // Log the details of the available sensitivity labels to the console. + catalog.forEach((sensitivityLabel) => { + console.log(`Name: ${sensitivityLabel.name}`); + console.log(`ID: ${sensitivityLabel.id}`); + console.log(`Tooltip: ${sensitivityLabel.tooltip}`); + console.log(`Color: ${sensitivityLabel.color}`); + console.log(`Sublabels: ${JSON.stringify(sensitivityLabel.children)}`); + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: children + uid: 'outlook!Office.SensitivityLabelDetails#children:member' + package: outlook! + fullName: children + summary: >- + The [sublabels](https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels) + of the sensitivity label. Returns `null` if a label doesn't have any sublabels. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'children: SensitivityLabelDetails[];' + return: + type: '[]' + - name: color + uid: 'outlook!Office.SensitivityLabelDetails#color:member' + package: outlook! + fullName: color + summary: The color of the sensitivity label. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'color: string;' + return: + type: string + - name: id + uid: 'outlook!Office.SensitivityLabelDetails#id:member' + package: outlook! + fullName: id + summary: The unique identifier (GUID) of the sensitivity label. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'id: string;' + return: + type: string + - name: name + uid: 'outlook!Office.SensitivityLabelDetails#name:member' + package: outlook! + fullName: name + summary: The name of the sensitivity label. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'name: string;' + return: + type: string + - name: tooltip + uid: 'outlook!Office.SensitivityLabelDetails#tooltip:member' + package: outlook! + fullName: tooltip + summary: The description of the sensitivity label. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'tooltip: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelscatalog.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelscatalog.yml new file mode 100644 index 0000000000..184ea28909 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sensitivitylabelscatalog.yml @@ -0,0 +1,280 @@ +### YamlMime:TSType +name: Office.SensitivityLabelsCatalog +uid: 'outlook!Office.SensitivityLabelsCatalog:interface' +package: outlook! +fullName: Office.SensitivityLabelsCatalog +summary: >- + Provides methods to check the status of the catalog of [sensitivity + labels](https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels) in Outlook and retrieve all available + sensitivity labels if the catalog is enabled. +remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your message + or appointment in compose mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.SensitivityLabelsCatalog#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: Gets all the sensitivity labels that are enabled in Outlook. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call + `getIsEnabledAsync` before using `getAsync`. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The available sensitivity labels + and their properties are returned in the `asyncResult.value` property. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.SensitivityLabelsCatalog#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: Gets all the sensitivity labels that are enabled in Outlook. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call + `getIsEnabledAsync` before using `getAsync`. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-labels-catalog.yaml + + + // This snippet gets all available sensitivity labels from the catalog. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded && asyncResult.value == true) { + Office.context.sensitivityLabelsCatalog.getAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + const catalog = asyncResult.value; + console.log("Sensitivity Labels Catalog:"); + console.log(JSON.stringify(catalog)); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The available sensitivity labels + and their properties are returned in the `asyncResult.value` property. + type: >- + (asyncResult: <[]>) => void + return: + type: void + description: '' + - name: 'getIsEnabledAsync(options, callback)' + uid: 'outlook!Office.SensitivityLabelsCatalog#getIsEnabledAsync:member(1)' + package: outlook! + fullName: 'getIsEnabledAsync(options, callback)' + summary: Checks whether the catalog of sensitivity labels is enabled in Outlook. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more + information, see [Get started with sensitivity + labels](https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels). + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + isPreview: false + isDeprecated: false + syntax: + content: >- + getIsEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The status of the catalog of + sensitivity labels is returned in the `asyncResult.value` property. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' + - name: getIsEnabledAsync(callback) + uid: 'outlook!Office.SensitivityLabelsCatalog#getIsEnabledAsync:member(2)' + package: outlook! + fullName: getIsEnabledAsync(callback) + summary: Checks whether the catalog of sensitivity labels is enabled in Outlook. + remarks: >- + \[ [API set: Mailbox 1.13](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more + information, see [Get started with sensitivity + labels](https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels). + + + **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 + subscription. + + + To learn more about how to manage sensitivity labels in your add-in, see [Manage the sensitivity label of your + message or appointment in compose + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label). + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/60-sensitivity-label/sensitivity-labels-catalog.yaml + + + // This snippet determines if the sensitivity labels catalog is enabled on the current mailbox. + + Office.context.sensitivityLabelsCatalog.getIsEnabledAsync((asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log(asyncResult.value); + } else { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getIsEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. The status of the catalog of + sensitivity labels is returned in the `asyncResult.value` property. + type: '(asyncResult: <boolean>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.seriestime.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.seriestime.yml new file mode 100644 index 0000000000..7959aea1bf --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.seriestime.yml @@ -0,0 +1,599 @@ +### YamlMime:TSType +name: Office.SeriesTime +uid: 'outlook!Office.SeriesTime:interface' +package: outlook! +fullName: Office.SeriesTime +summary: >- + The `SeriesTime` object provides methods to get and set the dates and times of appointments in a recurring series and + get the dates and times of meeting requests in a recurring series. +remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +methods: + - name: getDuration() + uid: 'outlook!Office.SeriesTime#getDuration:member(1)' + package: outlook! + fullName: getDuration() + summary: Gets the duration in minutes of a usual instance in a recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the duration of a usual instance in a recurring appointment series. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + const duration = recurrence.seriesTime.getDuration(); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getDuration(): number;' + return: + type: number + description: '' + - name: getEndDate() + uid: 'outlook!Office.SeriesTime#getEndDate:member(1)' + package: outlook! + fullName: getEndDate() + summary: >- + Gets the end date of a recurrence pattern in the following [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format: "YYYY-MM-DD". + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the end date of a recurring appointment series. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + const endDate = recurrence.seriesTime.getEndDate(); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getEndDate(): string;' + return: + type: string + description: '' + - name: getEndTime() + uid: 'outlook!Office.SeriesTime#getEndTime:member(1)' + package: outlook! + fullName: getEndTime() + summary: >- + Gets the end time of a usual appointment or meeting request instance of a recurrence pattern in whichever time + zone that the user or add-in set the recurrence pattern using the following [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format: "THH:mm:ss:mmm". + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the end time of a usual instance in a recurring appointment series. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + const endDate = recurrence.seriesTime.getEndTime(); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getEndTime(): string;' + return: + type: string + description: '' + - name: getStartDate() + uid: 'outlook!Office.SeriesTime#getStartDate:member(1)' + package: outlook! + fullName: getStartDate() + summary: >- + Gets the start date of a recurrence pattern in the following [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format: "YYYY-MM-DD". + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the start date of a recurring appointment series. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + const endDate = recurrence.seriesTime.getStartDate(); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getStartDate(): string;' + return: + type: string + description: '' + - name: getStartTime() + uid: 'outlook!Office.SeriesTime#getStartTime:member(1)' + package: outlook! + fullName: getStartTime() + summary: >- + Gets the start time of a usual appointment instance of a recurrence pattern in whichever time zone that the + user/add-in set the recurrence pattern using the following [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format: "THH:mm:ss:mmm". + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // This example gets the start time of a usual + + // instance in a recurring appointment series. + + const seriesTimeObject = new SeriesTime(); + + seriesTimeObject.setDuration(120); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getStartTime(): string;' + return: + type: string + description: '' + - name: setDuration(minutes) + uid: 'outlook!Office.SeriesTime#setDuration:member(1)' + package: outlook! + fullName: setDuration(minutes) + summary: >- + Sets the duration of all appointments in a recurrence pattern. This will also change the end time of the + recurrence pattern. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the duration of each appointment + + // in a recurring series to 2 hours. + + Office.context.mailbox.item.recurrence.getAsync(callback); + + + function callback(asyncResult) { + const context = asyncResult.context; + const recurrence = asyncResult.value; + const endDate = recurrence.seriesTime.getStartTime(); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setDuration(minutes: number): void;' + parameters: + - id: minutes + description: The length of the appointment in minutes. + type: number + return: + type: void + description: '' + - name: 'setEndDate(year, month, day)' + uid: 'outlook!Office.SeriesTime#setEndDate:member(1)' + package: outlook! + fullName: 'setEndDate(year, month, day)' + summary: Sets the end date of a recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the end date of a recurring + + // appointment series to November 2, 2017. + + const seriesTimeObject = new SeriesTime(); + + seriesTimeObject.setEndDate(2017, 10, 2); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setEndDate(year: number, month: number, day: number): void;' + parameters: + - id: year + description: The year value of the end date. + type: number + - id: month + description: >- + The month value of the end date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the + 12th month. + type: number + - id: day + description: The day value of the end date. + type: number + return: + type: void + description: '' + - name: setEndDate(date) + uid: 'outlook!Office.SeriesTime#setEndDate:member(2)' + package: outlook! + fullName: setEndDate(date) + summary: Sets the end date of a recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the end date of a + + // recurring appointment series to November 2, 2017 + + // using ISO 8601 date standard. + + const seriesTimeObject = new SeriesTime() + + seriesTimeObject.setEndDate("2017-11-02"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setEndDate(date: string): void;' + parameters: + - id: date + description: >- + End date of the recurring appointment series represented in the [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format: "YYYY-MM-DD". + type: string + return: + type: void + description: '' + - name: 'setStartDate(year, month, day)' + uid: 'outlook!Office.SeriesTime#setStartDate:member(1)' + package: outlook! + fullName: 'setStartDate(year, month, day)' + summary: Sets the start date of a recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the start date of a recurring + + // appointment series to November 2, 2017. + + const seriesTimeObject = new SeriesTime(); + + seriesTimeObject.setStartDate(2017, 10, 2); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setStartDate(year:number, month:number, day:number): void;' + parameters: + - id: year + description: The year value of the start date. + type: number + - id: month + description: >- + The month value of the start date. Valid range is 0-11 where 0 represents the 1st month and 11 represents + the 12th month. + type: number + - id: day + description: The day value of the start date. + type: number + return: + type: void + description: '' + - name: setStartDate(date) + uid: 'outlook!Office.SeriesTime#setStartDate:member(2)' + package: outlook! + fullName: setStartDate(date) + summary: Sets the start date of a recurring appointment series. + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the start date of a recurring + + // appointment series to November 2, 2017 + + // using ISO 8601 date standard. + + const seriesTimeObject = new SeriesTime() + + seriesTimeObject.setStartDate("2017-11-02"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setStartDate(date:string): void;' + parameters: + - id: date + description: >- + Start date of the recurring appointment series represented in the [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html) date format: "YYYY-MM-DD". + type: string + return: + type: void + description: '' + - name: 'setStartTime(hours, minutes)' + uid: 'outlook!Office.SeriesTime#setStartTime:member(1)' + package: outlook! + fullName: 'setStartTime(hours, minutes)' + summary: >- + Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence + pattern is set (the item's time zone is used by default). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the start time of each instance + + // of a recurring appointment series to 1:30 PM. + + const seriesTimeObject = new SeriesTime(); + + seriesTimeObject.setStartTime(13, 30); + + + // This example sets the start time of each instance + + // of a recurring appointment series to 11:30 AM. + + seriesTimeObject.setStartTime(11, 30); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setStartTime(hours: number, minutes: number): void;' + parameters: + - id: hours + description: 'The hour value of the start time. Valid range: 0-24.' + type: number + - id: minutes + description: 'The minute value of the start time. Valid range: 0-59.' + type: number + return: + type: void + description: '' + - name: setStartTime(time) + uid: 'outlook!Office.SeriesTime#setStartTime:member(2)' + package: outlook! + fullName: setStartTime(time) + summary: >- + Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence + pattern is set (the item's time zone is used by default). + remarks: >- + \[ [API set: Mailbox 1.7](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // This example sets the start time of each instance + + // of a recurring appointment series to 11:30 PM. + + const seriesTimeObject = new SeriesTime() + + seriesTimeObject.setStartTime("T23:30:00"); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'setStartTime(time: string): void;' + parameters: + - id: time + description: 'Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm".' + type: string + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sessiondata.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sessiondata.yml new file mode 100644 index 0000000000..5790d6ec5c --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sessiondata.yml @@ -0,0 +1,421 @@ +### YamlMime:TSType +name: Office.SessionData +uid: 'outlook!Office.SessionData:interface' +package: outlook! +fullName: Office.SessionData +summary: |- + Provides methods to manage an item's session data. + + **Important**: The entire SessionData object is limited to 50,000 characters per add-in. +remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'clearAsync(options, callback)' + uid: 'outlook!Office.SessionData#clearAsync:member(1)' + package: outlook! + fullName: 'clearAsync(options, callback)' + summary: Clears all session data key-value pairs. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.clearAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("sessionData.clearAsync succeeded"); + } else { + console.log("Failed to clear sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + clearAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: clearAsync(callback) + uid: 'outlook!Office.SessionData#clearAsync:member(2)' + package: outlook! + fullName: clearAsync(callback) + summary: Clears all session data key-value pairs. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'clearAsync(callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: getAllAsync(callback) + uid: 'outlook!Office.SessionData#getAllAsync:member(1)' + package: outlook! + fullName: getAllAsync(callback) + summary: Gets all session data key-value pairs. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.getAllAsync(function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("The sessionData is " + JSON.stringify(asyncResult.value)); + } else { + console.log("Failed to get all sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAllAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'getAsync(name, callback)' + uid: 'outlook!Office.SessionData#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(name, callback)' + summary: Gets the session data value of the specified key. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.getAsync( + "Date", + function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("The sessionData value is " + JSON.stringify(asyncResult.value)); + } else { + console.log("Failed to get sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(name: string, callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: name + description: The session data key. + type: string + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'removeAsync(name, options, callback)' + uid: 'outlook!Office.SessionData#removeAsync:member(1)' + package: outlook! + fullName: 'removeAsync(name, options, callback)' + summary: Removes a session data key-value pair. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.removeAsync( + "Date", + function callback(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("sessionData.removeAsync succeeded"); + } else { + console.log("Failed to remove sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + } + ); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + removeAsync(name: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: name + description: The session data key. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'removeAsync(name, callback)' + uid: 'outlook!Office.SessionData#removeAsync:member(2)' + package: outlook! + fullName: 'removeAsync(name, callback)' + summary: Removes a session data key-value pair. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'removeAsync(name: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: name + description: The session data key. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter, `asyncResult`, which is an `Office.AsyncResult` object. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(name, value, options, callback)' + uid: 'outlook!Office.SessionData#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(name, value, options, callback)' + summary: |- + Sets a session data key-value pair. + + **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/session-data-apis.yaml + + + Office.context.mailbox.item.sessionData.setAsync( + "Date", + "7/24/2020", + function(asyncResult) { + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) { + console.log("sessionData.setAsync succeeded"); + } else { + console.log("Failed to set sessionData. Error: " + JSON.stringify(asyncResult.error)); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(name: string, value: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: name + description: The session data key. + type: string + - id: value + description: The session data value as a string. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(name, value, callback)' + uid: 'outlook!Office.SessionData#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(name, value, callback)' + summary: |- + Sets a session data key-value pair. + + **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + remarks: >- + \[ [API set: Mailbox 1.11](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(name: string, value: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: name + description: The session data key. + type: string + - id: value + description: The session data value as a string. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.sharedproperties.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sharedproperties.yml new file mode 100644 index 0000000000..55f937ff6a --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.sharedproperties.yml @@ -0,0 +1,112 @@ +### YamlMime:TSType +name: Office.SharedProperties +uid: 'outlook!Office.SharedProperties:interface' +package: outlook! +fullName: Office.SharedProperties +summary: >- + Represents the properties of an appointment or message in a shared folder or shared mailbox. + + + For more information on how this object is used, see [Enable shared folders and shared mailbox scenarios in an Outlook + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access). +remarks: >- + \[ [API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox + support](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[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/65-delegates-and-shared-folders/get-shared-properties.yaml + + + Office.context.mailbox.item.getSharedPropertiesAsync((result) => { + if (result.status === Office.AsyncResultStatus.Failed) { + console.error("The current folder or mailbox isn't shared."); + return; + } + const sharedProperties = result.value; + console.log(`Owner: ${sharedProperties.owner}`); + console.log(`Permissions: ${sharedProperties.delegatePermissions}`); + console.log(`Target mailbox: ${sharedProperties.targetMailbox}`); + }); + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: delegatePermissions + uid: 'outlook!Office.SharedProperties#delegatePermissions:member' + package: outlook! + fullName: delegatePermissions + summary: 'The permissions that the delegate has on a shared folder, or the user has on a shared mailbox.' + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'delegatePermissions: MailboxEnums.DelegatePermissions;' + return: + type: '' + - name: owner + uid: 'outlook!Office.SharedProperties#owner:member' + package: outlook! + fullName: owner + summary: The email address of the owner of a shared item. + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'owner: string;' + return: + type: string + - name: targetMailbox + uid: 'outlook!Office.SharedProperties#targetMailbox:member' + package: outlook! + fullName: targetMailbox + summary: >- + The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook + client. + + + Use with `targetRestUrl` to construct the REST operation's URL. + + + Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'targetMailbox: string;' + return: + type: string + - name: targetRestUrl + uid: 'outlook!Office.SharedProperties#targetRestUrl:member' + package: outlook! + fullName: targetRestUrl + summary: |- + The REST API's base URL (currently `https://outlook.office.com/api`). + + Use with `targetMailbox` to construct the REST operation's URL. + + Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + remarks: '' + isPreview: false + isDeprecated: false + syntax: + content: 'targetRestUrl: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml new file mode 100644 index 0000000000..3edeb0d0b0 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.smartalertseventcompletedoptions.yml @@ -0,0 +1,343 @@ +### YamlMime:TSType +name: Office.SmartAlertsEventCompletedOptions +uid: 'outlook!Office.SmartAlertsEventCompletedOptions:interface' +package: outlook! +fullName: Office.SmartAlertsEventCompletedOptions +summary: >- + Specifies the behavior of a [Smart Alerts + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events) when it + completes processing an `OnMessageSend` or `OnAppointmentSend` event. +remarks: >- + \[ [API set: Mailbox 1.12](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose + + + #### Examples + + + ```TypeScript + + // The following example checks whether a location is specified in an appointment before it's sent. + + function onAppointmentSendHandler(event) { + Office.context.mailbox.item.location.getAsync({ asyncContext: event }, asyncResult => { + const event = asyncResult.asyncContext; + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(asyncResult.error.message); + // If the add-in is unable to retrieve the appointment's location, the appointment isn't sent. + event.completed({ allowEvent: false, errorMessage: "Failed to get the appointment's location." }); + return; + } + + if (asyncResult.value === "") { + // If no location is specified, the appointment isn't sent and the user is alerted to include a location. + event.completed( + { + allowEvent: false, + cancelLabel: "Add a location", + commandId: "msgComposeOpenPaneButton", + contextData: JSON.stringify({ a: "aValue", b: "bValue" }), + errorMessage: "Don't forget to add a meeting location.", + errorMessageMarkdown: ` + Don't forget to add a meeting location.\n\n + **Tip**: For a list of locations, + see [Meeting Locations]("https://www.contoso.com/meeting-locations).`, + sendModeOverride: Office.MailboxEnums.SendModeOverride.PromptUser + } + ); + } else { + // If a location is specified, the appointment is sent. + event.completed({ allowEvent: true }); + } + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: allowEvent + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#allowEvent:member' + package: outlook! + fullName: allowEvent + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler, this value indicates if the handled event should continue execution or + be canceled. For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set + `allowEvent` to `false` to cancel the sending of an item. For a complete sample, see the [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough). + remarks: >- + \[ [API set: Mailbox 1.12](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'allowEvent?: boolean;' + return: + type: boolean + - name: cancelLabel + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#cancelLabel:member' + package: outlook! + fullName: cancelLabel + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property + customizes the text of the **Don't Send** button in the Smart Alerts dialog. Custom text must be 20 characters + or less. + + + For an example, see the [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional). + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'cancelLabel?: string;' + return: + type: string + - name: commandId + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#commandId:member' + package: outlook! + fullName: commandId + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property + specifies the ID of the task pane or function that runs when the **Don't Send** button is selected from the + Smart Alerts dialog. + + + For an example, see the [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional). + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + The `commandId` value must match the task pane or function ID specified in the manifest of your add-in. The markup + depends on the type of manifest your add-in uses. + + + - **Add-in only manifest**: The `id` attribute of the + [Control](https://learn.microsoft.com/javascript/api/manifest/control) element representing the task pane or + function. + + + - **Unified manifest for Microsoft 365**: The "id" property of the task pane or function command in the + "controls" array. + + + If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane or + function ID to the `commandId` option. Otherwise, the JSON data assigned to `contextData` is ignored. + isPreview: false + isDeprecated: false + syntax: + content: 'commandId?: string;' + return: + type: string + - name: contextData + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#contextData:member' + package: outlook! + fullName: contextData + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property + specifies any JSON data passed to the add-in for processing when the **Don't Send** button is selected from + the Smart Alerts dialog. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: + + + - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier + versions of Outlook on Windows, only the `string` type is supported. + + + - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to + the `commandId` option. Otherwise, the JSON data assigned to `contextData` is ignored. + + + - To retrieve the value of the `contextData` property, you must call + `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation of your task pane. If + you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the + string using `JSON.parse()` once you retrieve it. + isPreview: false + isDeprecated: false + syntax: + content: 'contextData?: any;' + return: + type: any + - name: errorMessage + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#errorMessage:member' + package: outlook! + fullName: errorMessage + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property sets + the error message that will be displayed to the user. For an example, see the [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough). + remarks: >- + \[ [API set: Mailbox 1.12](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: 'errorMessage?: string;' + return: + type: string + - name: errorMessageMarkdown + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#errorMessageMarkdown:member' + package: outlook! + fullName: errorMessageMarkdown + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property sets + the error message displayed to the user. The error message is formatted using Markdown. For an example, see the + [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough). + remarks: >- + \[ [API set: Mailbox 1.15](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important** + + + - The formatted error message must be 500 characters or less. + + + - For guidance on supported Markdown elements, see [Limitations to formatting the dialog message using + Markdown](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#limitations-to-formatting-the-dialog-message-using-markdown). + + + - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a + plaintext version of the message using the `errorMessage` property. This ensures that the message is displayed + properly in Outlook clients that don't support Markdown. + isPreview: false + isDeprecated: false + syntax: + content: 'errorMessageMarkdown?: string;' + return: + type: string + - name: sendModeOverride + uid: 'outlook!Office.SmartAlertsEventCompletedOptions#sendModeOverride:member' + package: outlook! + fullName: sendModeOverride + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal completion of an event handler and set its `allowEvent` property to `false`, this property + overrides the [send mode + option](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#available-send-mode-options) + specified in the manifest at runtime. + + + For an example, see the [Smart Alerts + walkthrough](https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#override-the-send-mode-option-at-runtime-optional). + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **restricted** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: Currently, `sendModeOverride` can only be set to the [prompt + user](https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#prompt-user) + option. + isPreview: false + isDeprecated: false + syntax: + content: 'sendModeOverride?: MailboxEnums.SendModeOverride | string;' + return: + type: ' | string' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventargs.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventargs.yml new file mode 100644 index 0000000000..1a235f19f5 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventargs.yml @@ -0,0 +1,99 @@ +### YamlMime:TSType +name: Office.SpamReportingEventArgs +uid: 'outlook!Office.SpamReportingEventArgs:interface' +package: outlook! +fullName: Office.SpamReportingEventArgs +summary: >- + Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is + reported. +remarks: |- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + #### Examples + + ```TypeScript + // This example handles a SpamReporting event to process a reported spam or phishing message. + function onSpamReport(event) { + if (event.type === "SpamReporting") { + const reportedOptions = event.options; + const additionalInfo = event.freeText; + + // Run additional processing operations here. + + // Signal that the event has completed processing. + event.completed({ + moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder, + folderName: "Reported Messages", + onErrorDeleteItem: true, + showPostProcessingDialog: { + title: "Contoso Spam Reporting", + description: "Thank you for reporting this message." + } + }); + } + } + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: freeText + uid: 'outlook!Office.SpamReportingEventArgs#freeText:member' + package: outlook! + fullName: freeText + summary: The text provided by the user in the preprocessing dialog of a spam-reporting add-in. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + To add an optional text box to the preprocessing dialog of your spam-reporting add-in, you must configure the + [FreeTextLabel](https://learn.microsoft.com/javascript/api/manifest/preprocessingdialog#child-elements) element in + the manifest of your add-in. + + + To learn more about how to develop a spam-reporting add-in, see [Implement an integrated spam-reporting + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting). + isPreview: false + isDeprecated: false + syntax: + content: 'freeText: string;' + return: + type: string + - name: options + uid: 'outlook!Office.SpamReportingEventArgs#options:member' + package: outlook! + fullName: options + summary: >- + Returns `true` for each reporting option selected by the user in the preprocessing dialog of a spam-reporting + add-in. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + The order of the booleans in the array corresponds to the order of the reporting options specified in the + [ReportingOptions](https://learn.microsoft.com/javascript/api/manifest/reportingoptions) element of your add-in's + manifest. + + + To learn more about how to develop a spam-reporting add-in, see [Implement an integrated spam-reporting + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting). + isPreview: false + isDeprecated: false + syntax: + content: 'options: boolean[];' + return: + type: 'boolean[]' + - name: type + uid: 'outlook!Office.SpamReportingEventArgs#type:member' + package: outlook! + fullName: type + summary: >- + The type of event that was raised. For details, see + [Office.EventType](https://learn.microsoft.com/javascript/api/office/office.eventtype). + remarks: '\[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]' + isPreview: false + isDeprecated: false + syntax: + content: 'type: "SpamReporting";' + return: + type: '"SpamReporting"' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml new file mode 100644 index 0000000000..d12f557e17 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.spamreportingeventcompletedoptions.yml @@ -0,0 +1,296 @@ +### YamlMime:TSType +name: Office.SpamReportingEventCompletedOptions +uid: 'outlook!Office.SpamReportingEventCompletedOptions:interface' +package: outlook! +fullName: Office.SpamReportingEventCompletedOptions +summary: >- + Specifies the behavior of an [integrated spam-reporting + add-in](https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting) after it completes processing a + [SpamReporting](https://learn.microsoft.com/javascript/api/office/office.eventtype#fields) event. +remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Message Read + + + #### Examples + + + ```TypeScript + + // The following example handles a SpamReporting event to process a reported spam or phishing message. + + function onSpamReport(event) { + // Gets the Base64-encoded EML format of a reported message. + Office.context.mailbox.item.getAsFileAsync({ asyncContext: event }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(`Error encountered during message processing: ${asyncResult.error.message}`); + return; + } + + // Run additional processing operations here. + + /** + * Signals that the spam-reporting event has completed processing. + * It then moves the reported message to a custom mailbox folder named "Reported Messages" + * and shows a post-processing dialog to the user. + * If an error occurs while the message is being processed, the `onErrorDeleteItem` + * property determines whether the message will be deleted. + */ + const event = asyncResult.asyncContext; + event.completed({ + moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder, + folderName: "Reported Messages", + onErrorDeleteItem: true, + showPostProcessingDialog: { + title: "Contoso Spam Reporting", + description: "Thank you for reporting this message.", + }, + }); + }); + } + + ``` +isPreview: false +isDeprecated: false +type: interface +properties: + - name: folderName + uid: 'outlook!Office.SpamReportingEventCompletedOptions#folderName:member' + package: outlook! + fullName: folderName + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal that a reported message has finished processing, this property specifies the Outlook mailbox folder to + which the message will be moved. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - If the specified folder doesn't exist yet, it will be created before the message is moved. + + + - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be + specified. Otherwise, the reported message is moved to the **Junk Email** folder of the mailbox. If + `postProcessingAction` is set to another action other than `moveToCustomFolder`, the `folderName` property + is ignored. + isPreview: false + isDeprecated: false + syntax: + content: 'folderName?: string;' + return: + type: string + - name: moveItemTo + uid: 'outlook!Office.SpamReportingEventCompletedOptions#moveItemTo:member' + package: outlook! + fullName: moveItemTo + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal that a reported message has finished processing, this property specifies whether the message is moved to + a different folder in the mailbox. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - You can only use this property in a spam-reporting add-in in Outlook on the web, on Windows + ([new](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) and classic (starting in Version + 2308, Build 16724.10000)), and on Mac. If you're using an earlier build of classic Outlook on Windows that + supports the integrated spam-reporting feature, use the `postProcessingAction` property instead. + + + - If the property is set to `Office.MailboxEnums.MoveSpamItemTo.CustomFolder`, you must specify the name + of the folder to which the message will be moved in the `folderName` property of the `event.completed` call. + Otherwise, the `moveItemTo` property will default to `Office.MailboxEnums.MoveSpamItemTo.JunkFolder` and move the + reported message to the **Junk Email** folder. + isPreview: false + isDeprecated: false + syntax: + content: 'moveItemTo?: MailboxEnums.MoveSpamItemTo;' + return: + type: '' + - name: onErrorDeleteItem + uid: 'outlook!Office.SpamReportingEventCompletedOptions#onErrorDeleteItem:member' + package: outlook! + fullName: onErrorDeleteItem + summary: >- + When set to `true`, deletes a reported message if an error occurs while the message is processed. If this + property is set to `false` or isn't specified in the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)), the reported message remains in its current mailbox folder. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'onErrorDeleteItem?: boolean;' + return: + type: boolean + - name: postProcessingAction + uid: 'outlook!Office.SpamReportingEventCompletedOptions#postProcessingAction:member' + package: outlook! + fullName: postProcessingAction + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal that a reported message has finished processing, this property specifies whether the message is moved to + a different folder in the mailbox. The following post-processing actions are available. + + + - `delete` - Moves the reported message to the **Deleted Items** folder of the mailbox. + + + - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder + in the `folderName` property. + + + - `moveToSpamFolder` - Moves the reported message to the **Junk Email** folder of the mailbox. + + + - `noMove` - Leaves the reported message in its current folder. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + + + **Important**: + + + - In Outlook on Windows, you can only use this property in earlier builds that support the integrated + spam-reporting feature. If you're on Version 2308 (Build 16724.10000) or later, use the `moveItemTo` property + instead. + + + - This property isn't supported in Outlook on the web, on Mac, or in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627). Use the `moveItemTo` + property instead. + + + - If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which the + message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the + `postProcessingAction` property will default to `moveToSpamFolder` and move the reported message to the **Junk + Email** folder. + + + #### Examples + + + ```TypeScript + + // The following example handles a SpamReporting event to process a reported spam or phishing message. + + function onSpamReport(event) { + // Gets the Base64-encoded EML format of a reported message. + Office.context.mailbox.item.getAsFileAsync({ asyncContext: event }, (asyncResult) => { + if (asyncResult.status === Office.AsyncResultStatus.Failed) { + console.log(`Error encountered during message processing: ${asyncResult.error.message}`); + return; + } + + // Run additional processing operations here. + + /** + * Signals that the spam-reporting event has completed processing. + * It then moves the reported message to the Junk Email folder of the mailbox and shows a + * post-processing dialog to the user. + */ + const event = asyncResult.asyncContext; + event.completed({ + postProcessingAction: "moveToSpamFolder", + showPostProcessingDialog: { + title: "Contoso Spam Reporting", + description: "Thank you for reporting this message.", + }, + }); + }); + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'postProcessingAction?: string;' + return: + type: string + - name: showPostProcessingDialog + uid: 'outlook!Office.SpamReportingEventCompletedOptions#showPostProcessingDialog:member' + package: outlook! + fullName: showPostProcessingDialog + summary: >- + When you use the [completed + method](https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1)) + to signal that a reported message has finished processing, this property indicates if a post-processing dialog is + shown to the user. The JSON object assigned to this property must contain a title and a description. If this + property isn't specified, a dialog isn't shown to the user once their reported message is processed. + remarks: >- + \[ [API set: Mailbox 1.14](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission level + (Outlook)](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Message Read + isPreview: false + isDeprecated: false + syntax: + content: 'showPostProcessingDialog?: object;' + return: + type: object diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.subject.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.subject.yml new file mode 100644 index 0000000000..568524f242 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.subject.yml @@ -0,0 +1,239 @@ +### YamlMime:TSType +name: Office.Subject +uid: 'outlook!Office.Subject:interface' +package: outlook! +fullName: Office.Subject +summary: Provides methods to get and set the subject of an appointment or message in an Outlook add-in. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Subject#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the subject of an appointment or message. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or + message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => + void): void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Subject#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the subject of an appointment or message. + + + The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or + message. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.subject.getAsync(callback); + + + function callback(asyncResult) { + const subject = asyncResult.value; + } + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. + type: '(asyncResult: <string>) => void' + return: + type: void + description: '' + - name: 'setAsync(subject, options, callback)' + uid: 'outlook!Office.Subject#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(subject, options, callback)' + summary: >- + Sets the subject of an appointment or message. + + + The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or + message. Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in + place. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only + the Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see + [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Errors**: + + + - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. + + + #### Examples + + + ```TypeScript + + Office.context.mailbox.item.subject.setAsync("New subject!", function (asyncResult) { + if (asyncResult.status === "failed") { + console.log("Action failed with error: " + asyncResult.error.message); + } + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(subject: string, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: subject + description: The subject of the appointment or message. The string is limited to 255 characters. + type: string + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(subject, callback)' + uid: 'outlook!Office.Subject#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(subject, callback)' + summary: >- + Sets the subject of an appointment or message. + + + The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or + message. Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in + place. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only + the Appointment Organizer mode is supported. For more information on supported APIs in Outlook mobile, see + [Outlook JavaScript APIs supported in Outlook on mobile + devices](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis). + + + **Errors**: + + + - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(subject: string, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: subject + description: The subject of the appointment or message. The string is limited to 255 characters. + type: string + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.tasksuggestion.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.tasksuggestion.yml new file mode 100644 index 0000000000..4185590f2b --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.tasksuggestion.yml @@ -0,0 +1,99 @@ +### YamlMime:TSType +name: Office.TaskSuggestion +uid: 'outlook!Office.TaskSuggestion:interface' +package: outlook! +fullName: Office.TaskSuggestion +summary: >- + Represents a suggested task identified in an item. Read mode only. + + + The list of tasks suggested in an email message is returned in the `taskSuggestions` property of the + [Entities](xref:outlook!Office.Entities:interface) object that's returned when the `getEntities` or + `getEntitiesByType` method is called on the active item. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still + supported. We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Read + + + #### Examples + + + ```TypeScript + + const item = Office.context.mailbox.item; + + // Get an array of strings that represent task suggestions in the current item's body. + + const taskSuggestions = item.getEntitiesByType(Office.MailboxEnums.EntityType.TaskSuggestion); + + console.log("There are " + taskSuggestions.length + " task suggestions.") + + taskSuggestions.forEach(function (taskSuggestion) { + console.log("Assignees: " + JSON.stringify(taskSuggestion.assignees)); + console.log("Task: " + JSON.stringify(taskSuggestion.taskString)); + }); + + ``` +isPreview: false +isDeprecated: true +customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. +type: interface +properties: + - name: assignees + uid: 'outlook!Office.TaskSuggestion#assignees:member' + package: outlook! + fullName: assignees + summary: >- + Gets the users that should be assigned a suggested task. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'assignees: EmailUser[];' + return: + type: '[]' + - name: taskString + uid: 'outlook!Office.TaskSuggestion#taskString:member' + package: outlook! + fullName: taskString + summary: >- + Gets the text of an item that was identified as a task suggestion. + + + **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are + still supported. We recommend updating your contextual add-in to use regular expression rules as an alternative + solution. For guidance on how to implement these rules, see [Contextual Outlook + add-ins](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins). + remarks: '' + isPreview: false + isDeprecated: true + customDeprecatedMessage: >- + Use [regular expression rules](https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins) + instead. + syntax: + content: 'taskString: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.time.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.time.yml new file mode 100644 index 0000000000..fceaf0b221 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.time.yml @@ -0,0 +1,297 @@ +### YamlMime:TSType +name: Office.Time +uid: 'outlook!Office.Time:interface' +package: outlook! +fullName: Office.Time +summary: The `Time` object is returned as the start or end property of an appointment in compose mode. +remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose +isPreview: false +isDeprecated: false +type: interface +methods: + - name: 'getAsync(options, callback)' + uid: 'outlook!Office.Time#getAsync:member(1)' + package: outlook! + fullName: 'getAsync(options, callback)' + summary: >- + Gets the start or end time of an appointment. + + + The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated + Universal Time (UTC). You can convert the UTC time to the local client time by using the + `convertToLocalClientTime` method. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + isPreview: false + isDeprecated: false + syntax: + content: >- + getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): + void; + parameters: + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + When the method completes, the function passed in the `callback` parameter is called with a single parameter + of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. + type: '(asyncResult: <Date>) => void' + return: + type: void + description: '' + - name: getAsync(callback) + uid: 'outlook!Office.Time#getAsync:member(2)' + package: outlook! + fullName: getAsync(callback) + summary: >- + Gets the start or end time of an appointment. + + + The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated + Universal Time (UTC). You can convert the UTC time to the local client time by using the + `convertToLocalClientTime` method. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + #### Examples + + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-start-appointment-organizer.yaml + + + Office.context.mailbox.item.start.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Appointment starts: ${result.value}`); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'getAsync(callback: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: callback + description: >- + When the method completes, the function passed in the callback parameter is called with a single parameter + of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. + type: '(asyncResult: <Date>) => void' + return: + type: void + description: '' + - name: 'setAsync(dateTime, options, callback)' + uid: 'outlook!Office.Time#setAsync:member(1)' + package: outlook! + fullName: 'setAsync(dateTime, options, callback)' + summary: >- + Sets the start or end time of an appointment. + + + If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the + duration of the appointment as previously set. If the `setAsync` method is called on the `end` property, the + duration of the appointment will be extended to the new end time. + + + The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. + + + **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidEndTime`: The appointment end time is before the appointment start time. + + + #### Examples + + + ```TypeScript + + const startTime = new Date("3/14/2015"); + + const options = { + // Pass information that can be used in the callback. + asyncContext: {verb: "Set"} + }; + + Office.context.mailbox.item.start.setAsync(startTime, options, function(result) { + if (result.error) { + console.debug(result.error); + } else { + // Access the asyncContext that was passed to the setAsync method. + console.debug("Start Time " + result.asyncContext.verb); + } + }); + + ``` + + ```TypeScript + + // Link to full sample: + https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-set-start-appointment-organizer.yaml + + + const start = new Date(); // Represents current date and time. + + start.setDate(start.getDate() + 2); // Add 2 days to current date. + + Office.context.mailbox.item.start.setAsync(start, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Action failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set start date and time to ${start}`); + }); + + + ... + + + Office.context.mailbox.item.start.getAsync((result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Get start date failed with message ${result.error.message}`); + return; + } + + const end = result.value; // Set end to current start date and time. + end.setDate(end.getDate() + 1); // Set end as 1 day later than start date. + Office.context.mailbox.item.end.setAsync(end, (result) => { + if (result.status !== Office.AsyncResultStatus.Succeeded) { + console.error(`Set end date failed with message ${result.error.message}`); + return; + } + console.log(`Successfully set end date and time to ${end}`); + }); + }); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: >- + setAsync(dateTime: Date, options: Office.AsyncContextOptions, callback?: (asyncResult: + Office.AsyncResult) => void): void; + parameters: + - id: dateTime + description: A date-time object in Coordinated Universal Time (UTC). + type: Date + - id: options + description: >- + An object literal that contains one or more of the following properties:- `asyncContext`: Developers + can provide any object they wish to access in the callback function. + type: '' + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' + - name: 'setAsync(dateTime, callback)' + uid: 'outlook!Office.Time#setAsync:member(2)' + package: outlook! + fullName: 'setAsync(dateTime, callback)' + summary: >- + Sets the start or end time of an appointment. + + + If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the + duration of the appointment as previously set. If the `setAsync` method is called on the `end` property, the + duration of the appointment will be extended to the new end time. + + + The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. + + + **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + remarks: >- + \[ [API set: Mailbox 1.1](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read/write item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose + + + **Errors**: + + + - `InvalidEndTime`: The appointment end time is before the appointment start time. + isPreview: false + isDeprecated: false + syntax: + content: 'setAsync(dateTime: Date, callback?: (asyncResult: Office.AsyncResult) => void): void;' + parameters: + - id: dateTime + description: A date-time object in Coordinated Universal Time (UTC). + type: Date + - id: callback + description: >- + Optional. When the method completes, the function passed in the `callback` parameter is called with a single + parameter of type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` + property will contain an error code. + type: '(asyncResult: <void>) => void' + return: + type: void + description: '' diff --git a/docs/docs-ref-autogen/outlook_1_15/outlook/office.userprofile.yml b/docs/docs-ref-autogen/outlook_1_15/outlook/office.userprofile.yml new file mode 100644 index 0000000000..e91e704021 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/outlook/office.userprofile.yml @@ -0,0 +1,174 @@ +### YamlMime:TSType +name: Office.UserProfile +uid: 'outlook!Office.UserProfile:interface' +package: outlook! +fullName: Office.UserProfile +summary: >- + Information about the user associated with the mailbox. This includes their account type, display name, email address, + and time zone. +remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: + **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: + Compose or Read +isPreview: false +isDeprecated: false +type: interface +properties: + - name: accountType + uid: 'outlook!Office.UserProfile#accountType:member' + package: outlook! + fullName: accountType + summary: |- + Gets the account type of the user associated with the mailbox. + + **Note**: This member is currently only supported in Outlook on Mac starting in Version 16.9 (17121200). + remarks: >- + \[ [API set: Mailbox 1.6](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \] + + + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + The possible account types are listed in the following table. + + +
Value Description
enterprise The mailbox is on an + on-premises Exchange server.
gmail The mailbox is associated with a Gmail + account.
office365 The mailbox is associated with a Microsoft 365 work or school + account.
outlookCom The mailbox is associated with a personal Outlook.com + account.
+ + + **Note**: For hybrid Exchange environments, the returned account type value depends on where the mailbox is + hosted. If the mailbox is on an on-premises server, the account type value is **enterprise**. However, if it's + hosted on Exchange Online, the account type value is **office365**. + + + #### Examples + + + ```TypeScript + + console.log(Office.context.mailbox.userProfile.accountType); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'accountType: string;' + return: + type: string + - name: displayName + uid: 'outlook!Office.UserProfile#displayName:member' + package: outlook! + fullName: displayName + summary: Gets the user's display name. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // Example: Allie Bellew + + console.log(Office.context.mailbox.userProfile.displayName); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'displayName: string;' + return: + type: string + - name: emailAddress + uid: 'outlook!Office.UserProfile#emailAddress:member' + package: outlook! + fullName: emailAddress + summary: Gets the user's SMTP email address. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // Example: allieb@contoso.com + + console.log(Office.context.mailbox.userProfile.emailAddress); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'emailAddress: string;' + return: + type: string + - name: timeZone + uid: 'outlook!Office.UserProfile#timeZone:member' + package: outlook! + fullName: timeZone + summary: >- + Gets the user's time zone in Windows format. + + + The system time zone is usually returned. However, in Outlook on the web and in [new Outlook on + Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627)), the default time + zone in the calendar preferences is returned instead. + remarks: >- + **[Minimum permission + level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)**: **read item** + + + **[Applicable Outlook + mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)**: Compose or Read + + + #### Examples + + + ```TypeScript + + // Example: Pacific Standard Time + + console.log(Office.context.mailbox.userProfile.timeZone); + + ``` + isPreview: false + isDeprecated: false + syntax: + content: 'timeZone: string;' + return: + type: string diff --git a/docs/docs-ref-autogen/outlook_1_15/toc.yml b/docs/docs-ref-autogen/outlook_1_15/toc.yml new file mode 100644 index 0000000000..4ef427aa52 --- /dev/null +++ b/docs/docs-ref-autogen/outlook_1_15/toc.yml @@ -0,0 +1,1121 @@ +items: + - name: API reference + items: + - name: API reference overview + href: ../overview/overview.md + - name: Excel + href: /javascript/api/excel + - name: OneNote + href: /javascript/api/onenote + - name: Outlook + uid: outlook! + items: + - name: MailboxEnums + uid: '' + items: + - name: ActionType + uid: 'outlook!Office.MailboxEnums.ActionType:enum' + - name: AppointmentSensitivityType + uid: 'outlook!Office.MailboxEnums.AppointmentSensitivityType:enum' + - name: AttachmentContentFormat + uid: 'outlook!Office.MailboxEnums.AttachmentContentFormat:enum' + - name: AttachmentStatus + uid: 'outlook!Office.MailboxEnums.AttachmentStatus:enum' + - name: AttachmentType + uid: 'outlook!Office.MailboxEnums.AttachmentType:enum' + - name: CategoryColor + uid: 'outlook!Office.MailboxEnums.CategoryColor:enum' + - name: ComposeType + uid: 'outlook!Office.MailboxEnums.ComposeType:enum' + - name: Days + uid: 'outlook!Office.MailboxEnums.Days:enum' + - name: DelegatePermissions + uid: 'outlook!Office.MailboxEnums.DelegatePermissions:enum' + - name: EntityType + uid: 'outlook!Office.MailboxEnums.EntityType:enum' + - name: InfobarActionType + uid: 'outlook!Office.MailboxEnums.InfobarActionType:enum' + - name: InfobarType + uid: 'outlook!Office.MailboxEnums.InfobarType:enum' + - name: ItemNotificationMessageType + uid: 'outlook!Office.MailboxEnums.ItemNotificationMessageType:enum' + - name: ItemType + uid: 'outlook!Office.MailboxEnums.ItemType:enum' + - name: LocationType + uid: 'outlook!Office.MailboxEnums.LocationType:enum' + - name: Month + uid: 'outlook!Office.MailboxEnums.Month:enum' + - name: MoveSpamItemTo + uid: 'outlook!Office.MailboxEnums.MoveSpamItemTo:enum' + - name: OpenLocation + uid: 'outlook!Office.MailboxEnums.OpenLocation:enum' + - name: OWAView + uid: 'outlook!Office.MailboxEnums.OWAView:enum' + - name: RecipientType + uid: 'outlook!Office.MailboxEnums.RecipientType:enum' + - name: RecurrenceTimeZone + uid: 'outlook!Office.MailboxEnums.RecurrenceTimeZone:enum' + - name: RecurrenceType + uid: 'outlook!Office.MailboxEnums.RecurrenceType:enum' + - name: ResponseType + uid: 'outlook!Office.MailboxEnums.ResponseType:enum' + - name: RestVersion + uid: 'outlook!Office.MailboxEnums.RestVersion:enum' + - name: SaveLocation + uid: 'outlook!Office.MailboxEnums.SaveLocation:enum' + - name: SendModeOverride + uid: 'outlook!Office.MailboxEnums.SendModeOverride:enum' + - name: SourceProperty + uid: 'outlook!Office.MailboxEnums.SourceProperty:enum' + - name: WeekNumber + uid: 'outlook!Office.MailboxEnums.WeekNumber:enum' + - name: AppointmentCompose + uid: 'outlook!Office.AppointmentCompose:interface' + - name: AppointmentRead + uid: 'outlook!Office.AppointmentRead:interface' + - name: AppointmentTimeChangedEventArgs + uid: 'outlook!Office.AppointmentTimeChangedEventArgs:interface' + - name: AttachmentContent + uid: 'outlook!Office.AttachmentContent:interface' + - name: AttachmentDetails + uid: 'outlook!Office.AttachmentDetails:interface' + - name: AttachmentDetailsCompose + uid: 'outlook!Office.AttachmentDetailsCompose:interface' + - name: AttachmentsChangedEventArgs + uid: 'outlook!Office.AttachmentsChangedEventArgs:interface' + - name: Body + uid: 'outlook!Office.Body:interface' + - name: Categories + uid: 'outlook!Office.Categories:interface' + - name: CategoryDetails + uid: 'outlook!Office.CategoryDetails:interface' + - name: CoercionTypeOptions + uid: 'outlook!Office.CoercionTypeOptions:interface' + - name: Contact + uid: 'outlook!Office.Contact:interface' + - name: CustomProperties + uid: 'outlook!Office.CustomProperties:interface' + - name: DelayDeliveryTime + uid: 'outlook!Office.DelayDeliveryTime:interface' + - name: Diagnostics + uid: 'outlook!Office.Diagnostics:interface' + - name: EmailAddressDetails + uid: 'outlook!Office.EmailAddressDetails:interface' + - name: EmailUser + uid: 'outlook!Office.EmailUser:interface' + - name: EnhancedLocation + uid: 'outlook!Office.EnhancedLocation:interface' + - name: EnhancedLocationsChangedEventArgs + uid: 'outlook!Office.EnhancedLocationsChangedEventArgs:interface' + - name: Entities + uid: 'outlook!Office.Entities:interface' + - name: From + uid: 'outlook!Office.From:interface' + - name: InfobarClickedEventArgs + uid: 'outlook!Office.InfobarClickedEventArgs:interface' + - name: InfobarDetails + uid: 'outlook!Office.InfobarDetails:interface' + - name: InternetHeaders + uid: 'outlook!Office.InternetHeaders:interface' + - name: Item + uid: 'outlook!Office.Item:interface' + - name: LoadedMessageCompose + uid: 'outlook!Office.LoadedMessageCompose:interface' + - name: LoadedMessageRead + uid: 'outlook!Office.LoadedMessageRead:interface' + - name: LocalClientTime + uid: 'outlook!Office.LocalClientTime:interface' + - name: Location + uid: 'outlook!Office.Location:interface' + - name: LocationDetails + uid: 'outlook!Office.LocationDetails:interface' + - name: LocationIdentifier + uid: 'outlook!Office.LocationIdentifier:interface' + - name: Mailbox + uid: 'outlook!Office.Mailbox:interface' + - name: MailboxEvent + uid: 'outlook!Office.MailboxEvent:interface' + - name: MasterCategories + uid: 'outlook!Office.MasterCategories:interface' + - name: MeetingSuggestion + uid: 'outlook!Office.MeetingSuggestion:interface' + - name: MessageCompose + uid: 'outlook!Office.MessageCompose:interface' + - name: MessageRead + uid: 'outlook!Office.MessageRead:interface' + - name: NotificationMessageAction + uid: 'outlook!Office.NotificationMessageAction:interface' + - name: NotificationMessageDetails + uid: 'outlook!Office.NotificationMessageDetails:interface' + - name: NotificationMessages + uid: 'outlook!Office.NotificationMessages:interface' + - name: OfficeThemeChangedEventArgs + uid: 'outlook!Office.OfficeThemeChangedEventArgs:interface' + - name: Organizer + uid: 'outlook!Office.Organizer:interface' + - name: PhoneNumber + uid: 'outlook!Office.PhoneNumber:interface' + - name: Recipients + uid: 'outlook!Office.Recipients:interface' + - name: RecipientsChangedEventArgs + uid: 'outlook!Office.RecipientsChangedEventArgs:interface' + - name: RecipientsChangedFields + uid: 'outlook!Office.RecipientsChangedFields:interface' + - name: Recurrence + uid: 'outlook!Office.Recurrence:interface' + - name: RecurrenceChangedEventArgs + uid: 'outlook!Office.RecurrenceChangedEventArgs:interface' + - name: RecurrenceProperties + uid: 'outlook!Office.RecurrenceProperties:interface' + - name: RecurrenceTimeZone + uid: 'outlook!Office.RecurrenceTimeZone:interface' + - name: ReplyFormAttachment + uid: 'outlook!Office.ReplyFormAttachment:interface' + - name: ReplyFormData + uid: 'outlook!Office.ReplyFormData:interface' + - name: RoamingSettings + uid: 'outlook!Office.RoamingSettings:interface' + - name: SelectedItemDetails + uid: 'outlook!Office.SelectedItemDetails:interface' + - name: Sensitivity + uid: 'outlook!Office.Sensitivity:interface' + - name: SensitivityLabel + uid: 'outlook!Office.SensitivityLabel:interface' + - name: SensitivityLabelChangedEventArgs + uid: 'outlook!Office.SensitivityLabelChangedEventArgs:interface' + - name: SensitivityLabelDetails + uid: 'outlook!Office.SensitivityLabelDetails:interface' + - name: SensitivityLabelsCatalog + uid: 'outlook!Office.SensitivityLabelsCatalog:interface' + - name: SeriesTime + uid: 'outlook!Office.SeriesTime:interface' + - name: SessionData + uid: 'outlook!Office.SessionData:interface' + - name: SharedProperties + uid: 'outlook!Office.SharedProperties:interface' + - name: SmartAlertsEventCompletedOptions + uid: 'outlook!Office.SmartAlertsEventCompletedOptions:interface' + - name: SpamReportingEventArgs + uid: 'outlook!Office.SpamReportingEventArgs:interface' + - name: SpamReportingEventCompletedOptions + uid: 'outlook!Office.SpamReportingEventCompletedOptions:interface' + - name: Subject + uid: 'outlook!Office.Subject:interface' + - name: TaskSuggestion + uid: 'outlook!Office.TaskSuggestion:interface' + - name: Time + uid: 'outlook!Office.Time:interface' + - name: UserProfile + uid: 'outlook!Office.UserProfile:interface' + - name: PowerPoint + href: /javascript/api/powerpoint + - name: Visio + href: /javascript/api/visio + - name: Word + href: /javascript/api/word + - name: Common APIs + uid: office! + items: + - name: Office + uid: office! + items: + - name: Enums + uid: '' + items: + - name: ActiveView + uid: 'office!Office.ActiveView:enum' + - name: AsyncResultStatus + uid: 'office!Office.AsyncResultStatus:enum' + - name: BindingType + uid: 'office!Office.BindingType:enum' + - name: CoercionType + uid: 'office!Office.CoercionType:enum' + - name: CustomXMLNodeType + uid: 'office!Office.CustomXMLNodeType:enum' + - name: DevicePermissionType + uid: 'office!Office.DevicePermissionType:enum' + - name: DocumentMode + uid: 'office!Office.DocumentMode:enum' + - name: EventType + uid: 'office!Office.EventType:enum' + - name: FileType + uid: 'office!Office.FileType:enum' + - name: FilterType + uid: 'office!Office.FilterType:enum' + - name: GoToType + uid: 'office!Office.GoToType:enum' + - name: HostType + uid: 'office!Office.HostType:enum' + - name: Index + uid: 'office!Office.Index:enum' + - name: InitializationReason + uid: 'office!Office.InitializationReason:enum' + - name: PlatformType + uid: 'office!Office.PlatformType:enum' + - name: ProjectProjectFields + uid: 'office!Office.ProjectProjectFields:enum' + - name: ProjectResourceFields + uid: 'office!Office.ProjectResourceFields:enum' + - name: ProjectTaskFields + uid: 'office!Office.ProjectTaskFields:enum' + - name: ProjectViewTypes + uid: 'office!Office.ProjectViewTypes:enum' + - name: SelectionMode + uid: 'office!Office.SelectionMode:enum' + - name: StartupBehavior + uid: 'office!Office.StartupBehavior:enum' + - name: Table + uid: 'office!Office.Table:enum' + - name: ThemeId + uid: 'office!Office.ThemeId:enum' + - name: ValueFormat + uid: 'office!Office.ValueFormat:enum' + - name: VisibilityMode + uid: 'office!Office.VisibilityMode:enum' + - name: Actions + uid: 'office!Office.Actions:interface' + - name: AddBindingFromNamedItemOptions + uid: 'office!Office.AddBindingFromNamedItemOptions:interface' + - name: AddBindingFromPromptOptions + uid: 'office!Office.AddBindingFromPromptOptions:interface' + - name: AddBindingFromSelectionOptions + uid: 'office!Office.AddBindingFromSelectionOptions:interface' + - name: Addin + uid: 'office!Office.Addin:interface' + - name: AddinCommands.Event + uid: 'office!Office.AddinCommands.Event:interface' + - name: AddinCommands.EventCompletedOptions + uid: 'office!Office.AddinCommands.EventCompletedOptions:interface' + - name: AddinCommands.Source + uid: 'office!Office.AddinCommands.Source:interface' + - name: AsyncContextOptions + uid: 'office!Office.AsyncContextOptions:interface' + - name: AsyncResult + uid: 'office!Office.AsyncResult:interface' + - name: Auth + uid: 'office!Office.Auth:interface' + - name: AuthOptions + uid: 'office!Office.AuthOptions:interface' + - name: BeforeDocumentCloseNotification + uid: 'office!Office.BeforeDocumentCloseNotification:interface' + - name: Binding + uid: 'office!Office.Binding:interface' + - name: BindingDataChangedEventArgs + uid: 'office!Office.BindingDataChangedEventArgs:interface' + - name: Bindings + uid: 'office!Office.Bindings:interface' + - name: BindingSelectionChangedEventArgs + uid: 'office!Office.BindingSelectionChangedEventArgs:interface' + - name: Context + uid: 'office!Office.Context:interface' + - name: ContextInformation + uid: 'office!Office.ContextInformation:interface' + - name: Control + uid: 'office!Office.Control:interface' + - name: CustomXmlNode + uid: 'office!Office.CustomXmlNode:interface' + - name: CustomXmlPart + uid: 'office!Office.CustomXmlPart:interface' + - name: CustomXmlParts + uid: 'office!Office.CustomXmlParts:interface' + - name: CustomXmlPrefixMappings + uid: 'office!Office.CustomXmlPrefixMappings:interface' + - name: DevicePermission + uid: 'office!Office.DevicePermission:interface' + - name: Dialog + uid: 'office!Office.Dialog:interface' + - name: DialogMessageOptions + uid: 'office!Office.DialogMessageOptions:interface' + - name: DialogOptions + uid: 'office!Office.DialogOptions:interface' + - name: DialogParentMessageReceivedEventArgs + uid: 'office!Office.DialogParentMessageReceivedEventArgs:interface' + - name: Document + uid: 'office!Office.Document:interface' + - name: DocumentSelectionChangedEventArgs + uid: 'office!Office.DocumentSelectionChangedEventArgs:interface' + - name: Error + uid: 'office!Office.Error:interface' + - name: File + uid: 'office!Office.File:interface' + - name: FileProperties + uid: 'office!Office.FileProperties:interface' + - name: GetBindingDataOptions + uid: 'office!Office.GetBindingDataOptions:interface' + - name: GetFileOptions + uid: 'office!Office.GetFileOptions:interface' + - name: GetSelectedDataOptions + uid: 'office!Office.GetSelectedDataOptions:interface' + - name: GoToByIdOptions + uid: 'office!Office.GoToByIdOptions:interface' + - name: Group + uid: 'office!Office.Group:interface' + - name: IPromiseConstructor + uid: 'office!Office.IPromiseConstructor:interface' + - name: MatrixBinding + uid: 'office!Office.MatrixBinding:interface' + - name: NodeDeletedEventArgs + uid: 'office!Office.NodeDeletedEventArgs:interface' + - name: NodeInsertedEventArgs + uid: 'office!Office.NodeInsertedEventArgs:interface' + - name: NodeReplacedEventArgs + uid: 'office!Office.NodeReplacedEventArgs:interface' + - name: OfficeTheme + uid: 'office!Office.OfficeTheme:interface' + - name: RangeCoordinates + uid: 'office!Office.RangeCoordinates:interface' + - name: RangeFormatConfiguration + uid: 'office!Office.RangeFormatConfiguration:interface' + - name: RemoveHandlerOptions + uid: 'office!Office.RemoveHandlerOptions:interface' + - name: RequirementSetSupport + uid: 'office!Office.RequirementSetSupport:interface' + - name: Ribbon + uid: 'office!Office.Ribbon:interface' + - name: RibbonUpdaterData + uid: 'office!Office.RibbonUpdaterData:interface' + - name: SaveSettingsOptions + uid: 'office!Office.SaveSettingsOptions:interface' + - name: SetBindingDataOptions + uid: 'office!Office.SetBindingDataOptions:interface' + - name: SetSelectedDataOptions + uid: 'office!Office.SetSelectedDataOptions:interface' + - name: Settings + uid: 'office!Office.Settings:interface' + - name: SettingsChangedEventArgs + uid: 'office!Office.SettingsChangedEventArgs:interface' + - name: Slice + uid: 'office!Office.Slice:interface' + - name: Tab + uid: 'office!Office.Tab:interface' + - name: TableBinding + uid: 'office!Office.TableBinding:interface' + - name: TableData + uid: 'office!Office.TableData:class' + - name: TextBinding + uid: 'office!Office.TextBinding:interface' + - name: UI + uid: 'office!Office.UI:interface' + - name: Urls + uid: 'office!Office.Urls:interface' + - name: VisibilityModeChangedMessage + uid: 'office!Office.VisibilityModeChangedMessage:interface' + - name: OfficeExtension + items: + - name: ClientObject + uid: 'office!OfficeExtension.ClientObject:class' + - name: ClientRequestContext + uid: 'office!OfficeExtension.ClientRequestContext:class' + - name: ClientResult + uid: 'office!OfficeExtension.ClientResult:class' + - name: DebugInfo + uid: 'office!OfficeExtension.DebugInfo:interface' + - name: EmbeddedOptions + uid: 'office!OfficeExtension.EmbeddedOptions:interface' + - name: EmbeddedSession + uid: 'office!OfficeExtension.EmbeddedSession:class' + - name: Error + uid: 'office!OfficeExtension.Error:class' + - name: ErrorCodes + uid: 'office!OfficeExtension.ErrorCodes:class' + - name: EventHandlerResult + uid: 'office!OfficeExtension.EventHandlerResult:class' + - name: EventHandlers + uid: 'office!OfficeExtension.EventHandlers:class' + - name: EventInfo + uid: 'office!OfficeExtension.EventInfo:interface' + - name: IPromise + uid: 'office!OfficeExtension.IPromise:type' + - name: LoadOption + uid: 'office!OfficeExtension.LoadOption:interface' + - name: RequestContextDebugInfo + uid: 'office!OfficeExtension.RequestContextDebugInfo:interface' + - name: RequestUrlAndHeaderInfo + uid: 'office!OfficeExtension.RequestUrlAndHeaderInfo:interface' + - name: RunOptions + uid: 'office!OfficeExtension.RunOptions:interface' + - name: TrackedObjects + uid: 'office!OfficeExtension.TrackedObjects:class' + - name: UpdateOptions + uid: 'office!OfficeExtension.UpdateOptions:interface' + - name: OfficeRuntime + uid: office-runtime! + items: + - name: ApiInformation + uid: 'office-runtime!OfficeRuntime.ApiInformation:interface' + - name: Auth + uid: 'office-runtime!OfficeRuntime.Auth:interface' + - name: AuthOptions + uid: 'office-runtime!OfficeRuntime.AuthOptions:interface' + - name: Dialog + uid: 'office-runtime!OfficeRuntime.Dialog:interface' + - name: DisplayWebDialogOptions + uid: 'office-runtime!OfficeRuntime.DisplayWebDialogOptions:interface' + - name: Storage + uid: 'office-runtime!OfficeRuntime.Storage:interface' + - name: Add-in only manifest reference + items: + - name: Add-in only manifest overview + href: ../../manifest/manifest.md + - name: AllowSnapshot + href: ../../manifest/allowsnapshot.md + - name: AlternateId + href: ../../manifest/alternateid.md + - name: AppDomain + href: ../../manifest/appdomain.md + - name: AppDomains + href: ../../manifest/appdomains.md + - name: CitationText + href: ../../manifest/citationtext.md + - name: DefaultLocale + href: ../../manifest/defaultlocale.md + - name: DefaultSettings + href: ../../manifest/defaultsettings.md + - name: Description + href: ../../manifest/description.md + - name: DesktopSettings + href: ../../manifest/desktopsettings.md + - name: Dictionary + href: ../../manifest/dictionary.md + - name: DictionaryHomePage + href: ../../manifest/dictionaryhomepage.md + - name: DisableEntityHighlighting + href: ../../manifest/disableentityhighlighting.md + - name: DisplayName + href: ../../manifest/displayname.md + - name: EquivalentAddin + href: ../../manifest/equivalentaddin.md + - name: EquivalentAddins + href: ../../manifest/equivalentaddins.md + - name: ExtendedOverrides + href: ../../manifest/extendedoverrides.md + - name: FileName + href: ../../manifest/filename.md + - name: Form + href: ../../manifest/form.md + - name: FormSettings + href: ../../manifest/formsettings.md + - name: HighResolutionIconUrl + href: ../../manifest/highresolutioniconurl.md + - name: Host + href: ../../manifest/host.md + - name: Hosts + href: ../../manifest/hosts.md + - name: IconUrl + href: ../../manifest/iconurl.md + - name: Id + href: ../../manifest/id.md + - name: Metadata + href: ../../manifest/metadata.md + - name: Method + href: ../../manifest/method.md + - name: Methods + href: ../../manifest/methods.md + - name: Namespace + href: ../../manifest/namespace.md + - name: OfficeApp + href: ../../manifest/officeapp.md + - name: Override + href: ../../manifest/override.md + - name: Permissions + href: ../../manifest/permissions.md + - name: PhoneSettings + href: ../../manifest/phonesettings.md + - name: ProgId + href: ../../manifest/progid.md + - name: ProviderName + href: ../../manifest/providername.md + - name: QueryUri + href: ../../manifest/queryuri.md + - name: RequestedHeight + href: ../../manifest/requestedheight.md + - name: RequestedWidth + href: ../../manifest/requestedwidth.md + - name: Requirements + href: ../../manifest/requirements.md + - name: Rule + href: ../../manifest/rule.md + - name: Set + href: ../../manifest/set.md + - name: Sets + href: ../../manifest/sets.md + - name: SourceLocation + href: ../../manifest/sourcelocation.md + - name: SupportUrl + href: ../../manifest/supporturl.md + - name: TabletSettings + href: ../../manifest/tabletsettings.md + - name: TargetDialect + href: ../../manifest/targetdialect.md + - name: TargetDialects + href: ../../manifest/targetdialects.md + - name: Tokens + href: ../../manifest/tokens.md + - name: Token + href: ../../manifest/token.md + - name: Type + href: ../../manifest/type.md + - name: Version + href: ../../manifest/version.md + - name: VersionOverrides + items: + - name: VersionOverrides Overview + href: ../../manifest/versionoverrides.md + - name: VersionOverrides 1.0 TaskPane + href: ../../manifest/versionoverrides-1-0-taskpane.md + - name: VersionOverrides 1.0 Content + href: ../../manifest/versionoverrides-1-0-content.md + - name: VersionOverrides 1.0 Mail + href: ../../manifest/versionoverrides-1-0-mail.md + - name: VersionOverrides 1.1 Mail + href: ../../manifest/versionoverrides-1-1-mail.md + - name: Action + href: ../../manifest/action.md + - name: AllFormFactors + href: ../../manifest/allformfactors.md + - name: Control + href: ../../manifest/control.md + - name: Control (Button) + href: ../../manifest/control-button.md + - name: Control (Menu) + href: ../../manifest/control-menu.md + - name: Control (MobileButton) + href: ../../manifest/control-mobilebutton.md + - name: CustomTab + href: ../../manifest/customtab.md + - name: DesktopFormFactor + href: ../../manifest/desktopformfactor.md + - name: Enabled + href: ../../manifest/enabled.md + - name: EquivalentAddin + href: ../../manifest/equivalentaddin.md + - name: EquivalentAddins + href: ../../manifest/equivalentaddins.md + - name: Event + href: ../../manifest/event.md + - name: ExtendedPermission + href: ../../manifest/extendedpermission.md + - name: ExtendedPermissions + href: ../../manifest/extendedpermissions.md + - name: ExtensionPoint + href: ../../manifest/extensionpoint.md + - name: FunctionFile + href: ../../manifest/functionfile.md + - name: GetStarted + href: ../../manifest/getstarted.md + - name: Group + href: ../../manifest/group.md + - name: Host + href: ../../manifest/host.md + - name: Hosts + href: ../../manifest/hosts.md + - name: Icon + href: ../../manifest/icon.md + - name: Image + href: ../../manifest/image.md + - name: Images + href: ../../manifest/images.md + - name: Item + href: ../../manifest/item.md + - name: Items + href: ../../manifest/items.md + - name: LaunchEvent + href: ../../manifest/launchevent.md + - name: LaunchEvents + href: ../../manifest/launchevents.md + - name: LongStrings + href: ../../manifest/longstrings.md + - name: MessageAttachment + href: ../../manifest/messageattachment.md + - name: MessageAttachments + href: ../../manifest/messageattachments.md + - name: MobileFormFactor + href: ../../manifest/mobileformfactor.md + - name: MoreInfo + href: ../../manifest/moreinfo.md + - name: OfficeMenu + href: ../../manifest/officemenu.md + - name: OfficeTab + href: ../../manifest/officetab.md + - name: Override + href: ../../manifest/override.md + - name: OverriddenByRibbonApi + href: ../../manifest/overriddenbyribbonapi.md + - name: Page + href: ../../manifest/page.md + - name: PreProcessingDialog + href: ../../manifest/preprocessingdialog.md + - name: ReportPhishingCustomization + href: ../../manifest/reportphishingcustomization.md + - name: ReportingOptions + href: ../../manifest/reportingoptions.md + - name: Resources + href: ../../manifest/resources.md + - name: Runtime + href: ../../manifest/runtime.md + - name: Runtimes + href: ../../manifest/runtimes.md + - name: Scopes + href: ../../manifest/scopes.md + - name: Script + href: ../../manifest/script.md + - name: ShortStrings + href: ../../manifest/shortstrings.md + - name: SourceLocation (version overrides) + href: ../../manifest/customfunctionssourcelocation.md + - name: String + href: ../../manifest/string.md + - name: Supertip + href: ../../manifest/supertip.md + - name: SupportsSharedFolders + href: ../../manifest/supportssharedfolders.md + - name: Url + href: ../../manifest/url.md + - name: Urls + href: ../../manifest/urls.md + - name: WebApplicationInfo + href: ../../manifest/webapplicationinfo.md + - name: Requirement sets + items: + - name: Application and platform availability + href: ../../requirement-sets/requirement-sets.md + - name: Excel requirement sets + items: + - name: Overview + href: ../../requirement-sets/excel/excel-api-requirement-sets.md + displayName: Excel + - name: CustomFunctionsRuntime API requirement sets + href: ../../requirement-sets/excel/custom-functions-requirement-sets.md + displayName: 'Excel, Custom Functions' + - name: Excel preview APIs + href: ../../requirement-sets/excel/excel-preview-apis.md + displayName: Excel + - name: ExcelApi online-only requirement set + href: ../../requirement-sets/excel/excel-api-online-requirement-set.md + displayName: Excel + - name: ExcelApi 1.17 requirement set + href: ../../requirement-sets/excel/excel-api-1-17-requirement-set.md + displayName: Excel + - name: ExcelApi 1.16 requirement set + href: ../../requirement-sets/excel/excel-api-1-16-requirement-set.md + displayName: Excel + - name: ExcelApi 1.15 requirement set + href: ../../requirement-sets/excel/excel-api-1-15-requirement-set.md + displayName: Excel + - name: ExcelApi 1.14 requirement set + href: ../../requirement-sets/excel/excel-api-1-14-requirement-set.md + displayName: Excel + - name: ExcelApi 1.13 requirement set + href: ../../requirement-sets/excel/excel-api-1-13-requirement-set.md + displayName: Excel + - name: ExcelApi 1.12 requirement set + href: ../../requirement-sets/excel/excel-api-1-12-requirement-set.md + displayName: Excel + - name: ExcelApi 1.11 requirement set + href: ../../requirement-sets/excel/excel-api-1-11-requirement-set.md + displayName: Excel + - name: ExcelApi 1.10 requirement set + href: ../../requirement-sets/excel/excel-api-1-10-requirement-set.md + displayName: Excel + - name: ExcelApi 1.9 requirement set + href: ../../requirement-sets/excel/excel-api-1-9-requirement-set.md + displayName: Excel + - name: ExcelApi 1.8 requirement set + href: ../../requirement-sets/excel/excel-api-1-8-requirement-set.md + displayName: Excel + - name: ExcelApi 1.7 requirement set + href: ../../requirement-sets/excel/excel-api-1-7-requirement-set.md + displayName: Excel + - name: ExcelApi 1.6 requirement set + href: ../../requirement-sets/excel/excel-api-1-6-requirement-set.md + displayName: Excel + - name: ExcelApi 1.5 requirement set + href: ../../requirement-sets/excel/excel-api-1-5-requirement-set.md + displayName: Excel + - name: ExcelApi 1.4 requirement set + href: ../../requirement-sets/excel/excel-api-1-4-requirement-set.md + displayName: Excel + - name: ExcelApi 1.3 requirement set + href: ../../requirement-sets/excel/excel-api-1-3-requirement-set.md + displayName: Excel + - name: ExcelApi 1.2 requirement set + href: ../../requirement-sets/excel/excel-api-1-2-requirement-set.md + displayName: Excel + - name: ExcelApi 1.1 requirement set + href: ../../requirement-sets/excel/excel-api-1-1-requirement-set.md + displayName: Excel + - name: OneNote requirement sets + items: + - name: API requirement sets + href: ../../requirement-sets/onenote/onenote-api-requirement-sets.md + displayName: OneNote + - name: Outlook requirement sets + items: + - name: Overview + href: ../../requirement-sets/outlook/outlook-api-requirement-sets.md + displayName: Outlook + - name: Mailbox preview requirement set + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md + - name: Office + href: >- + ../../requirement-sets/outlook/preview-requirement-set/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.14 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.14/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.14/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.13 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/outlook-requirement-set-1.13.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.13/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.13/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.12 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/outlook-requirement-set-1.12.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.12/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.12/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.11 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/outlook-requirement-set-1.11.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.11/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.11/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.10 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/outlook-requirement-set-1.10.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.10/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.10/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.9 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/outlook-requirement-set-1.9.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.9/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.9/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.8 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/outlook-requirement-set-1.8.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.8/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.8/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.7 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/outlook-requirement-set-1.7.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.7/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.7/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.6 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/outlook-requirement-set-1.6.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.6/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.6/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.5 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/outlook-requirement-set-1.5.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.5/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.5/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.4 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/outlook-requirement-set-1.4.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.4/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.4/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.3 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/outlook-requirement-set-1.3.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.3/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.3/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.2 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/outlook-requirement-set-1.2.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.2/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.2/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.1 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/outlook-requirement-set-1.1.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.1/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.1/Office.context.mailbox.item.md + - name: PowerPoint requirement sets + items: + - name: Overview + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-requirement-sets.md + displayName: PowerPoint + - name: PowerPoint preview APIs + href: ../../requirement-sets/powerpoint/powerpoint-preview-apis.md + displayName: PowerPoint + - name: PowerPointApi 1.7 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-7-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.6 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-6-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.5 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-5-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.4 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-4-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.3 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-3-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.2 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-2-requirement-set.md + displayName: PowerPoint + - name: PowerPointApi 1.1 requirement set + href: >- + ../../requirement-sets/powerpoint/powerpoint-api-1-1-requirement-set.md + displayName: PowerPoint + - name: Word requirement sets + items: + - name: Overview + href: ../../requirement-sets/word/word-api-requirement-sets.md + displayName: Word + - name: Word preview APIs + href: ../../requirement-sets/word/word-preview-apis.md + displayName: Word + - name: WordApi online-only requirement set + href: ../../requirement-sets/word/word-api-online-requirement-set.md + displayName: Word + - name: WordApiDesktop 1.1 requirement set + href: >- + ../../requirement-sets/word/word-api-desktop-1.1-requirement-set.md + displayName: Word + - name: WordApi 1.9 requirement set + href: ../../requirement-sets/word/word-api-1-9-requirement-set.md + displayName: Word + - name: WordApi 1.8 requirement set + href: ../../requirement-sets/word/word-api-1-8-requirement-set.md + displayName: Word + - name: WordApi 1.7 requirement set + href: ../../requirement-sets/word/word-api-1-7-requirement-set.md + displayName: Word + - name: WordApi 1.6 requirement set + href: ../../requirement-sets/word/word-api-1-6-requirement-set.md + displayName: Word + - name: WordApi 1.5 requirement set + href: ../../requirement-sets/word/word-api-1-5-requirement-set.md + displayName: Word + - name: WordApi 1.4 requirement set + href: ../../requirement-sets/word/word-api-1-4-requirement-set.md + displayName: Word + - name: WordApi 1.3 requirement set + href: ../../requirement-sets/word/word-api-1-3-requirement-set.md + displayName: Word + - name: WordApi 1.2 requirement set + href: ../../requirement-sets/word/word-api-1-2-requirement-set.md + displayName: Word + - name: WordApi 1.1 requirement set + href: ../../requirement-sets/word/word-api-1-1-requirement-set.md + displayName: Word + - name: Common API requirement sets + items: + - name: Overview + href: ../../requirement-sets/common/office-add-in-requirement-sets.md + - name: Add-in commands requirement sets + href: ../../requirement-sets/common/add-in-commands-requirement-sets.md + - name: Device Permission Service requirement sets + href: >- + ../../requirement-sets/common/device-permission-service-requirement-sets.md + - name: Dialog API requirement sets + href: ../../requirement-sets/common/dialog-api-requirement-sets.md + - name: Dialog Origin requirement sets + href: ../../requirement-sets/common/dialog-origin-requirement-sets.md + - name: Identity API requirement sets + href: ../../requirement-sets/common/identity-api-requirement-sets.md + - name: Image Coercion requirement sets + href: ../../requirement-sets/common/image-coercion-requirement-sets.md + - name: Keyboard Shortcuts requirement sets + href: >- + ../../requirement-sets/common/keyboard-shortcuts-requirement-sets.md + - name: Nested App Auth requirement sets + href: ../../requirement-sets/common/nested-app-auth-requirement-sets.md + - name: Open Browser Window requirement sets + href: >- + ../../requirement-sets/common/open-browser-window-api-requirement-sets.md + - name: Ribbon API requirement sets + href: ../../requirement-sets/common/ribbon-api-requirement-sets.md + - name: Shared Runtime requirement sets + href: ../../requirement-sets/common/shared-runtime-requirement-sets.md diff --git a/docs/docs-ref-autogen/outlook_1_2/toc.yml b/docs/docs-ref-autogen/outlook_1_2/toc.yml index af048c625a..35dbfb40d7 100644 --- a/docs/docs-ref-autogen/outlook_1_2/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_2/toc.yml @@ -649,6 +649,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_3/toc.yml b/docs/docs-ref-autogen/outlook_1_3/toc.yml index 9ff63adf47..4430722566 100644 --- a/docs/docs-ref-autogen/outlook_1_3/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_3/toc.yml @@ -657,6 +657,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_4/toc.yml b/docs/docs-ref-autogen/outlook_1_4/toc.yml index 9ff63adf47..4430722566 100644 --- a/docs/docs-ref-autogen/outlook_1_4/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_4/toc.yml @@ -657,6 +657,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_5/toc.yml b/docs/docs-ref-autogen/outlook_1_5/toc.yml index 9ff63adf47..4430722566 100644 --- a/docs/docs-ref-autogen/outlook_1_5/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_5/toc.yml @@ -657,6 +657,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_6/toc.yml b/docs/docs-ref-autogen/outlook_1_6/toc.yml index 9ff63adf47..4430722566 100644 --- a/docs/docs-ref-autogen/outlook_1_6/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_6/toc.yml @@ -657,6 +657,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_7/toc.yml b/docs/docs-ref-autogen/outlook_1_7/toc.yml index 83df4d3be7..2550f5eec1 100644 --- a/docs/docs-ref-autogen/outlook_1_7/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_7/toc.yml @@ -687,6 +687,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_8/toc.yml b/docs/docs-ref-autogen/outlook_1_8/toc.yml index d68fce54b9..b5cb1ea0af 100644 --- a/docs/docs-ref-autogen/outlook_1_8/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_8/toc.yml @@ -721,6 +721,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/outlook_1_9/toc.yml b/docs/docs-ref-autogen/outlook_1_9/toc.yml index d68fce54b9..b5cb1ea0af 100644 --- a/docs/docs-ref-autogen/outlook_1_9/toc.yml +++ b/docs/docs-ref-autogen/outlook_1_9/toc.yml @@ -721,6 +721,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/overview/overview.md b/docs/docs-ref-autogen/overview/overview.md index cc14a84ee9..b225ad9233 100644 --- a/docs/docs-ref-autogen/overview/overview.md +++ b/docs/docs-ref-autogen/overview/overview.md @@ -3,7 +3,7 @@ ms.topic: landing-page title: Office JavaScript API reference description: The Office JavaScript APIs by host and version. ms.localizationpriority: high -ms.date: 12/17/2024 +ms.date: 01/09/2025 --- # Office Add-ins JavaScript API reference @@ -49,6 +49,7 @@ The following is a list of APIs for the [supported Office host applications](/of

Outlook APIs

  • Mailbox Preview
  • +
  • Mailbox 1.15
  • Mailbox 1.14
  • Mailbox 1.13
  • Mailbox 1.12
  • diff --git a/docs/docs-ref-autogen/powerpoint/toc.yml b/docs/docs-ref-autogen/powerpoint/toc.yml index a5a14ee48b..046197d10d 100644 --- a/docs/docs-ref-autogen/powerpoint/toc.yml +++ b/docs/docs-ref-autogen/powerpoint/toc.yml @@ -673,6 +673,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml index a382cec567..47054c072d 100644 --- a/docs/docs-ref-autogen/powerpoint_1_1/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_1/toc.yml @@ -585,6 +585,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml index b5f97c1fe0..5e18aeb366 100644 --- a/docs/docs-ref-autogen/powerpoint_1_2/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_2/toc.yml @@ -593,6 +593,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml index 8ccf5795cf..4405822143 100644 --- a/docs/docs-ref-autogen/powerpoint_1_3/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_3/toc.yml @@ -611,6 +611,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml index 6f87238a82..445a8b9a29 100644 --- a/docs/docs-ref-autogen/powerpoint_1_4/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_4/toc.yml @@ -647,6 +647,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml index c397051c9c..6f50eddde6 100644 --- a/docs/docs-ref-autogen/powerpoint_1_5/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_5/toc.yml @@ -651,6 +651,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml index f1c1c717e4..e6a86f88c5 100644 --- a/docs/docs-ref-autogen/powerpoint_1_6/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_6/toc.yml @@ -655,6 +655,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/powerpoint_1_7/toc.yml b/docs/docs-ref-autogen/powerpoint_1_7/toc.yml index dc3bc1e199..b32602ed71 100644 --- a/docs/docs-ref-autogen/powerpoint_1_7/toc.yml +++ b/docs/docs-ref-autogen/powerpoint_1_7/toc.yml @@ -669,6 +669,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/visio/toc.yml b/docs/docs-ref-autogen/visio/toc.yml index 273d8c518e..f853b14fb6 100644 --- a/docs/docs-ref-autogen/visio/toc.yml +++ b/docs/docs-ref-autogen/visio/toc.yml @@ -431,6 +431,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word/toc.yml b/docs/docs-ref-autogen/word/toc.yml index c0b1a1d896..0f3eaf32a8 100644 --- a/docs/docs-ref-autogen/word/toc.yml +++ b/docs/docs-ref-autogen/word/toc.yml @@ -843,6 +843,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_1/toc.yml b/docs/docs-ref-autogen/word_1_1/toc.yml index a2d0788cac..cc720e23cc 100644 --- a/docs/docs-ref-autogen/word_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_1_1/toc.yml @@ -627,6 +627,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_2/toc.yml b/docs/docs-ref-autogen/word_1_2/toc.yml index a2d0788cac..cc720e23cc 100644 --- a/docs/docs-ref-autogen/word_1_2/toc.yml +++ b/docs/docs-ref-autogen/word_1_2/toc.yml @@ -627,6 +627,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_3/toc.yml b/docs/docs-ref-autogen/word_1_3/toc.yml index a59709d555..cf561ae3c8 100644 --- a/docs/docs-ref-autogen/word_1_3/toc.yml +++ b/docs/docs-ref-autogen/word_1_3/toc.yml @@ -683,6 +683,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml index a59709d555..cf561ae3c8 100644 --- a/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_3_hidden_document/toc.yml @@ -683,6 +683,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_4/toc.yml b/docs/docs-ref-autogen/word_1_4/toc.yml index b973b986d8..686b8ad69d 100644 --- a/docs/docs-ref-autogen/word_1_4/toc.yml +++ b/docs/docs-ref-autogen/word_1_4/toc.yml @@ -711,6 +711,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml index b973b986d8..686b8ad69d 100644 --- a/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_4_hidden_document/toc.yml @@ -711,6 +711,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_5/toc.yml b/docs/docs-ref-autogen/word_1_5/toc.yml index c28de73d3b..1a6a5327fb 100644 --- a/docs/docs-ref-autogen/word_1_5/toc.yml +++ b/docs/docs-ref-autogen/word_1_5/toc.yml @@ -753,6 +753,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml index c28de73d3b..1a6a5327fb 100644 --- a/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml +++ b/docs/docs-ref-autogen/word_1_5_hidden_document/toc.yml @@ -753,6 +753,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_6/toc.yml b/docs/docs-ref-autogen/word_1_6/toc.yml index 19c043bc6a..6d63661c8a 100644 --- a/docs/docs-ref-autogen/word_1_6/toc.yml +++ b/docs/docs-ref-autogen/word_1_6/toc.yml @@ -769,6 +769,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_7/toc.yml b/docs/docs-ref-autogen/word_1_7/toc.yml index c239ef0854..36998cdc88 100644 --- a/docs/docs-ref-autogen/word_1_7/toc.yml +++ b/docs/docs-ref-autogen/word_1_7/toc.yml @@ -795,6 +795,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_8/toc.yml b/docs/docs-ref-autogen/word_1_8/toc.yml index 2afab294df..dc9473e435 100644 --- a/docs/docs-ref-autogen/word_1_8/toc.yml +++ b/docs/docs-ref-autogen/word_1_8/toc.yml @@ -799,6 +799,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_1_9/toc.yml b/docs/docs-ref-autogen/word_1_9/toc.yml index da83a02521..b26fdddedc 100644 --- a/docs/docs-ref-autogen/word_1_9/toc.yml +++ b/docs/docs-ref-autogen/word_1_9/toc.yml @@ -807,6 +807,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml index 0b3d488f47..14db194da9 100644 --- a/docs/docs-ref-autogen/word_desktop_1_1/toc.yml +++ b/docs/docs-ref-autogen/word_desktop_1_1/toc.yml @@ -825,6 +825,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/docs-ref-autogen/word_online/toc.yml b/docs/docs-ref-autogen/word_online/toc.yml index da83a02521..b26fdddedc 100644 --- a/docs/docs-ref-autogen/word_online/toc.yml +++ b/docs/docs-ref-autogen/word_online/toc.yml @@ -807,6 +807,22 @@ items: - name: Office.context.mailbox.item href: >- ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: >- + ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/docs/includes/outlook-1_15.md b/docs/includes/outlook-1_15.md new file mode 100644 index 0000000000..14612d98d6 --- /dev/null +++ b/docs/includes/outlook-1_15.md @@ -0,0 +1,85 @@ +| Class | Fields | Description | +|:---|:---|:---| +|[LoadedMessageCompose](/javascript/api/outlook/office.loadedmessagecompose)|[bcc](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-bcc-member)|Gets the recipients on the **Bcc** (blind carbon copy) line of a message.| +||[body](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-body-member)|Gets the item's body and format.| +||[categories](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-categories-member)|Gets an object that provides methods to manage the item's categories.| +||[cc](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-cc-member)|Gets recipients on the **Cc** (carbon copy) line of a message.| +||[conversationId](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-conversationid-member)|Gets an identifier for the email conversation that contains a particular message.| +||[delayDeliveryTime](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-delaydeliverytime-member)|Gets the delayed delivery date and time of a message.| +||[from](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-from-member)|Gets the email address of the sender of a message.| +||[getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| +||[getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| +||[getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentsasync-member(1))|Gets the item's attachments as an array.| +||[getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentsasync-member(1))|Gets the item's attachments as an array.| +||[getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getcomposetypeasync-member(1))|Specifies the type of message compose and its coercion type.| +||[getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getcomposetypeasync-member(1))|Specifies the type of message compose and its coercion type.| +||[getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getconversationindexasync-member(1))|Gets the Base64-encoded position of the current message in a conversation thread.| +||[getConversationIndexAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getconversationindexasync-member(1))|Gets the Base64-encoded position of the current message in a conversation thread.| +||[getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| +||[getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| +||[getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemclassasync-member(1))|Gets the Exchange Web Services item class of the selected message.| +||[getItemClassAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemclassasync-member(1))|Gets the Exchange Web Services item class of the selected message.| +||[getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemidasync-member(1))|Asynchronously gets the ID of a saved item.| +||[getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemidasync-member(1))|Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}| +||[getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| +||[getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| +||[inReplyTo](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-inreplyto-member)|Gets the message ID of the original message being replied to by the current message.| +||[internetHeaders](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-internetheaders-member)|Gets the custom internet headers of a message.| +||[isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-isclientsignatureenabledasync-member(1))|Gets if the client signature is enabled.| +||[isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-isclientsignatureenabledasync-member(1))|Gets if the client signature is enabled.| +||[itemType](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-itemtype-member)|Gets the type of item that an instance represents.| +||[loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-loadcustompropertiesasync-member(1))|Asynchronously loads custom properties for this add-in on the selected item.| +||[notificationMessages](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-notificationmessages-member)|Gets the notification messages of the item.| +||[saveAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-saveasync-member(1))|Asynchronously saves the current message as a draft.| +||[saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-saveasync-member(1))|Asynchronously saves the current message as a draft.| +||[sensitivityLabel](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-sensitivitylabel-member)|Gets the sensitivity label of a message.| +||[seriesId](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-seriesid-member)|Gets the ID of the series that an instance belongs to.| +||[subject](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-subject-member)|Gets the description that appears in the subject field of an item.| +||[to](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-to-member)|Gets the recipients on the **To** line of a message.| +||[unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| +||[unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| +|[LoadedMessageRead](/javascript/api/outlook/office.loadedmessageread)|[attachments](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-attachments-member)|Gets the item's attachments as an array.| +||[body](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-body-member)|Gets the item's body and its format.| +||[categories](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-categories-member)|Gets an object that provides methods to manage the item's categories.| +||[cc](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-cc-member)|Gets recipients on the **Cc** (carbon copy) line of a message.| +||[conversationId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-conversationid-member)|Gets an identifier for the email conversation that contains a particular message.| +||[dateTimeCreated](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-datetimecreated-member)|Gets the date and time that an item was created.| +||[dateTimeModified](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-datetimemodified-member)|Gets the date and time that an item was last modified.| +||[displayReplyAllFormAsync(formData: string \| ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyallformasync-member(1))|Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the| +||[displayReplyAllFormAsync(formData: string \| ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyallformasync-member(1))|Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the| +||[displayReplyFormAsync(formData: string \| ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyformasync-member(1))|Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment.| +||[displayReplyFormAsync(formData: string \| ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyformasync-member(1))|Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment.| +||[end](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-end-member)|Gets the date and time that the appointment is to end.| +||[from](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-from-member)|Gets the email address of the sender of a message.| +||[getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getallinternetheadersasync-member(1))|Gets all the internet headers for the message as a string.| +||[getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getallinternetheadersasync-member(1))|Gets all the internet headers for the message as a string.| +||[getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getasfileasync-member(1))|Gets the current message in EML format encoded in Base64.| +||[getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getasfileasync-member(1))|Gets the current message in EML format encoded in Base64.| +||[getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| +||[getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| +||[getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| +||[getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| +||[getRegExMatches()](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getregexmatches-member(1))|Returns string values in the selected item that match the regular expressions defined in an XML manifest file.| +||[getRegExMatchesByName(name: string)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getregexmatchesbyname-member(1))|Returns string values in the selected item that match the named regular expression defined in an XML manifest file.| +||[getSelectedRegExMatches()](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getselectedregexmatches-member(1))|Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.| +||[getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| +||[getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| +||[internetMessageId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-internetmessageid-member)|Gets the internet message identifier of a message.| +||[itemClass](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemclass-member)|Gets the Exchange Web Services item class of the selected message.| +||[itemId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemid-member)|Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}| +||[itemType](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemtype-member)|Gets the type of item that an instance represents.| +||[loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-loadcustompropertiesasync-member(1))|Asynchronously loads custom properties for this add-in on the selected item.| +||[location](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-location-member)|Gets the location of a meeting request.| +||[normalizedSubject](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-normalizedsubject-member)|Gets the subject of an item, with all prefixes removed (including RE: and FWD:).| +||[notificationMessages](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-notificationmessages-member)|Gets the notification messages of the item.| +||[recurrence](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-recurrence-member)|Gets the recurrence pattern of an appointment.| +||[sender](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-sender-member)|Gets the email address of the sender of an email message.| +||[seriesId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-seriesid-member)|Gets the ID of the series that an instance belongs to.| +||[start](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-start-member)|Gets the date and time that the appointment is to begin.| +||[subject](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-subject-member)|Gets the description that appears in the subject field of an item.| +||[to](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-to-member)|Gets the recipients on the **To** line of a message.| +||[unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| +||[unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| +|[Mailbox](/javascript/api/outlook/office.mailbox)|[loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.mailbox#outlook-office-mailbox-loaditembyidasync-member(1))|Loads a single mail item by its Exchange Web Services (EWS) ID.| +||[loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.mailbox#outlook-office-mailbox-loaditembyidasync-member(1))|Loads a single mail item by its Exchange Web Services (EWS) ID.| +|[SmartAlertsEventCompletedOptions](/javascript/api/outlook/office.smartalertseventcompletedoptions)|[errorMessageMarkdown](/javascript/api/outlook/office.smartalertseventcompletedoptions#outlook-office-smartalertseventcompletedoptions-errormessagemarkdown-member)|When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler| diff --git a/docs/includes/outlook-preview.md b/docs/includes/outlook-preview.md index 1b150fd772..21f1a57fe5 100644 --- a/docs/includes/outlook-preview.md +++ b/docs/includes/outlook-preview.md @@ -12,87 +12,4 @@ ||[getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.isalldayevent#outlook-office-isalldayevent-getasync-member(1))|Gets the boolean value indicating whether the event is all day or not.| ||[setAsync(isAllDayEvent: boolean, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.isalldayevent#outlook-office-isalldayevent-setasync-member(1))|Sets the all-day event status of an appointment.| ||[setAsync(isAllDayEvent: boolean, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.isalldayevent#outlook-office-isalldayevent-setasync-member(1))|Sets the all-day event status of an appointment.| -|[LoadedMessageCompose](/javascript/api/outlook/office.loadedmessagecompose)|[bcc](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-bcc-member)|Gets the recipients on the **Bcc** (blind carbon copy) line of a message.| -||[body](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-body-member)|Gets the item's body and format.| -||[categories](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-categories-member)|Gets an object that provides methods to manage the item's categories.| -||[cc](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-cc-member)|Gets recipients on the **Cc** (carbon copy) line of a message.| -||[conversationId](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-conversationid-member)|Gets an identifier for the email conversation that contains a particular message.| -||[delayDeliveryTime](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-delaydeliverytime-member)|Gets the delayed delivery date and time of a message.| -||[from](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-from-member)|Gets the email address of the sender of a message.| -||[getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| -||[getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| -||[getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentsasync-member(1))|Gets the item's attachments as an array.| -||[getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getattachmentsasync-member(1))|Gets the item's attachments as an array.| -||[getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getcomposetypeasync-member(1))|Specifies the type of message compose and its coercion type.| -||[getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getcomposetypeasync-member(1))|Specifies the type of message compose and its coercion type.| -||[getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getconversationindexasync-member(1))|Gets the Base64-encoded position of the current message in a conversation thread.| -||[getConversationIndexAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getconversationindexasync-member(1))|Gets the Base64-encoded position of the current message in a conversation thread.| -||[getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| -||[getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| -||[getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemclassasync-member(1))|Gets the Exchange Web Services item class of the selected message.| -||[getItemClassAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemclassasync-member(1))|Gets the Exchange Web Services item class of the selected message.| -||[getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemidasync-member(1))|Asynchronously gets the ID of a saved item.| -||[getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getitemidasync-member(1))|Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}| -||[getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| -||[getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| -||[inReplyTo](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-inreplyto-member)|Gets the message ID of the original message being replied to by the current message.| -||[internetHeaders](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-internetheaders-member)|Gets the custom internet headers of a message.| -||[isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-isclientsignatureenabledasync-member(1))|Gets if the client signature is enabled.| -||[isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-isclientsignatureenabledasync-member(1))|Gets if the client signature is enabled.| -||[itemType](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-itemtype-member)|Gets the type of item that an instance represents.| -||[loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-loadcustompropertiesasync-member(1))|Asynchronously loads custom properties for this add-in on the selected item.| -||[notificationMessages](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-notificationmessages-member)|Gets the notification messages of the item.| -||[saveAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-saveasync-member(1))|Asynchronously saves the current message as a draft.| -||[saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-saveasync-member(1))|Asynchronously saves the current message as a draft.| -||[sensitivityLabel](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-sensitivitylabel-member)|Gets the sensitivity label of a message.| -||[seriesId](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-seriesid-member)|Gets the ID of the series that an instance belongs to.| -||[subject](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-subject-member)|Gets the description that appears in the subject field of an item.| -||[to](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-to-member)|Gets the recipients on the **To** line of a message.| -||[unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| -||[unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessagecompose#outlook-office-loadedmessagecompose-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| -|[LoadedMessageRead](/javascript/api/outlook/office.loadedmessageread)|[attachments](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-attachments-member)|Gets the item's attachments as an array.| -||[body](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-body-member)|Gets the item's body and its format.| -||[categories](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-categories-member)|Gets an object that provides methods to manage the item's categories.| -||[cc](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-cc-member)|Gets recipients on the **Cc** (carbon copy) line of a message.| -||[conversationId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-conversationid-member)|Gets an identifier for the email conversation that contains a particular message.| -||[dateTimeCreated](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-datetimecreated-member)|Gets the date and time that an item was created.| -||[dateTimeModified](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-datetimemodified-member)|Gets the date and time that an item was last modified.| -||[displayReplyAllFormAsync(formData: string \| ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyallformasync-member(1))|Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the| -||[displayReplyAllFormAsync(formData: string \| ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyallformasync-member(1))|Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the| -||[displayReplyFormAsync(formData: string \| ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyformasync-member(1))|Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment.| -||[displayReplyFormAsync(formData: string \| ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-displayreplyformasync-member(1))|Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment.| -||[end](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-end-member)|Gets the date and time that the appointment is to end.| -||[from](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-from-member)|Gets the email address of the sender of a message.| -||[getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getallinternetheadersasync-member(1))|Gets all the internet headers for the message as a string.| -||[getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getallinternetheadersasync-member(1))|Gets all the internet headers for the message as a string.| -||[getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getasfileasync-member(1))|Gets the current message in EML format encoded in Base64.| -||[getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getasfileasync-member(1))|Gets the current message in EML format encoded in Base64.| -||[getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| -||[getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getattachmentcontentasync-member(1))|Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object.| -||[getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| -||[getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getinitializationcontextasync-member(1))|Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}.| -||[getRegExMatches()](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getregexmatches-member(1))|Returns string values in the selected item that match the regular expressions defined in an XML manifest file.| -||[getRegExMatchesByName(name: string)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getregexmatchesbyname-member(1))|Returns string values in the selected item that match the named regular expression defined in an XML manifest file.| -||[getSelectedRegExMatches()](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getselectedregexmatches-member(1))|Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.| -||[getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| -||[getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-getsharedpropertiesasync-member(1))|Gets the properties of an appointment or message in a shared folder or shared mailbox.| -||[internetMessageId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-internetmessageid-member)|Gets the internet message identifier of a message.| -||[itemClass](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemclass-member)|Gets the Exchange Web Services item class of the selected message.| -||[itemId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemid-member)|Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}| -||[itemType](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-itemtype-member)|Gets the type of item that an instance represents.| -||[loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-loadcustompropertiesasync-member(1))|Asynchronously loads custom properties for this add-in on the selected item.| -||[location](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-location-member)|Gets the location of a meeting request.| -||[normalizedSubject](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-normalizedsubject-member)|Gets the subject of an item, with all prefixes removed (including RE: and FWD:).| -||[notificationMessages](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-notificationmessages-member)|Gets the notification messages of the item.| -||[recurrence](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-recurrence-member)|Gets the recurrence pattern of an appointment.| -||[sender](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-sender-member)|Gets the email address of the sender of an email message.| -||[seriesId](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-seriesid-member)|Gets the ID of the series that an instance belongs to.| -||[start](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-start-member)|Gets the date and time that the appointment is to begin.| -||[subject](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-subject-member)|Gets the description that appears in the subject field of an item.| -||[to](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-to-member)|Gets the recipients on the **To** line of a message.| -||[unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| -||[unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.loadedmessageread#outlook-office-loadedmessageread-unloadasync-member(1))|When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing.| -|[Mailbox](/javascript/api/outlook/office.mailbox)|[loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.mailbox#outlook-office-mailbox-loaditembyidasync-member(1))|Loads a single mail item by its Exchange Web Services (EWS) ID.| -||[loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void)](/javascript/api/outlook/office.mailbox#outlook-office-mailbox-loaditembyidasync-member(1))|Loads a single mail item by its Exchange Web Services (EWS) ID.| |[MessageRead](/javascript/api/outlook/office.messageread)|[display](/javascript/api/outlook/office.messageread#outlook-office-messageread-display-member)|Gets an object to temporarily set the content displayed in the body or subject of a message in read mode.| -|[SmartAlertsEventCompletedOptions](/javascript/api/outlook/office.smartalertseventcompletedoptions)|[errorMessageMarkdown](/javascript/api/outlook/office.smartalertseventcompletedoptions#outlook-office-smartalertseventcompletedoptions-errormessagemarkdown-member)|When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler| diff --git a/docs/requirement-sets/outlook/outlook-api-requirement-sets.md b/docs/requirement-sets/outlook/outlook-api-requirement-sets.md index aa19c71a58..d32f06f255 100644 --- a/docs/requirement-sets/outlook/outlook-api-requirement-sets.md +++ b/docs/requirement-sets/outlook/outlook-api-requirement-sets.md @@ -1,7 +1,7 @@ --- title: Outlook JavaScript API requirement sets description: Learn more about the Outlook JavaScript API requirement sets. -ms.date: 10/22/2024 +ms.date: 01/09/2025 ms.topic: overview ms.localizationpriority: high --- @@ -96,7 +96,7 @@ The following servers support Outlook add-ins. | Product | Major Exchange version | Supported API requirement sets | |---|---|---| -| Exchange Online | Latest build | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)1 | +| Exchange Online | Latest build | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md), [1.15](requirement-set-1.15/outlook-requirement-set-1.15.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)1 | | Exchange on-premises2 | 2019 | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md) | || 2016 | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md) | @@ -111,11 +111,11 @@ Add-ins are supported in Outlook on the following platforms. | Platform | Major Office/Outlook version | Supported API requirement sets | |---|---|---| -| Web browser1 2 | modern Outlook UI when connected to
    Exchange Online: subscription, Outlook.com | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)
    [DevicePermissionService 1.1](../common/device-permission-service-requirement-sets.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md) | +| Web browser1 2 | modern Outlook UI when connected to
    Exchange Online: subscription, Outlook.com | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md), [1.15](requirement-set-1.15/outlook-requirement-set-1.15.md)
    [DevicePermissionService 1.1](../common/device-permission-service-requirement-sets.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md) | || classic Outlook UI when connected to
    Exchange on-premises | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md) | -| Windows | [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)
    [DevicePermissionService 1.1](../common/device-permission-service-requirement-sets.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md) | -|| Microsoft 365 subscription | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md)4, [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md)4, [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md)4, [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md)4, [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md)4, [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md)4, [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)4
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md)
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | -|| retail perpetual Outlook 2016 and later | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md)4, [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md)4, [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md)4, [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md)4, [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md)4, [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md)4, [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)4
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | +| Windows | [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627) | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md), [1.15](requirement-set-1.15/outlook-requirement-set-1.15.md)
    [DevicePermissionService 1.1](../common/device-permission-service-requirement-sets.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md) | +|| Microsoft 365 subscription | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md)4, [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md)4, [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md)4, [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md)4, [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md)4, [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md)4, [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)4, [1.15](requirement-set-1.15/outlook-requirement-set-1.15.md)4
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [NestedAppAuth 1.1](../common/nested-app-auth-requirement-sets.md)
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | +|| retail perpetual Outlook 2016 and later | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md)4, [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md)4, [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md)4, [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md)4, [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md)4, [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md)4, [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)4, [1.15](requirement-set-1.15/outlook-requirement-set-1.15.md)4
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | || volume-licensed perpetual Outlook 2024 | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md), [1.10](requirement-set-1.10/outlook-requirement-set-1.10.md), [1.11](requirement-set-1.11/outlook-requirement-set-1.11.md), [1.12](requirement-set-1.12/outlook-requirement-set-1.12.md), [1.13](requirement-set-1.13/outlook-requirement-set-1.13.md), [1.14](requirement-set-1.14/outlook-requirement-set-1.14.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | || volume-licensed perpetual Outlook 2021 | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md), [1.7](requirement-set-1.7/outlook-requirement-set-1.7.md), [1.8](requirement-set-1.8/outlook-requirement-set-1.8.md), [1.9](requirement-set-1.9/outlook-requirement-set-1.9.md)
    [DialogAPI 1.1](../common/dialog-api-requirement-sets.md)
    [DialogAPI 1.2](../common/dialog-api-requirement-sets.md)
    [DialogOrigin 1.1](../common/dialog-origin-requirement-sets.md)
    [IdentityAPI 1.3](../common/identity-api-requirement-sets.md)3
    [OpenBrowserWindowApi 1.1](../common/open-browser-window-api-requirement-sets.md) | || volume-licensed perpetual Outlook 2019 | [1.1](requirement-set-1.1/outlook-requirement-set-1.1.md), [1.2](requirement-set-1.2/outlook-requirement-set-1.2.md), [1.3](requirement-set-1.3/outlook-requirement-set-1.3.md), [1.4](requirement-set-1.4/outlook-requirement-set-1.4.md), [1.5](requirement-set-1.5/outlook-requirement-set-1.5.md), [1.6](requirement-set-1.6/outlook-requirement-set-1.6.md) | @@ -166,6 +166,7 @@ The following table lists version support for more recent Mailbox requirement se | 1.12 | Version 2206 (Build 15330.20196) | | 1.13 | Version 2304 (Build 16327.20248) | | 1.14 | Version 2404 (Build 17530.15000) | +| 1.15 | Version 24XX (Build XXXXX.XXXXX) | For more details about your client version, see the update history page for [Microsoft 365](/officeupdates/update-history-office365-proplus-by-date) or [Office 2024](/officeupdates/update-history-office-2024) and how to [find your Office client version and update channel](https://support.microsoft.com/office/932788b8-a3ce-44bf-bb09-e334518b8b19). diff --git a/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item.md b/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item.md index 13cb092c39..de1cef9fff 100644 --- a/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item.md +++ b/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item.md @@ -1,7 +1,7 @@ --- title: Office.context.mailbox.item - preview requirement set description: Outlook Mailbox API preview requirement set version of the Item object model. -ms.date: 11/19/2024 +ms.date: 01/09/2025 ms.localizationpriority: medium --- @@ -197,6 +197,7 @@ You can subscribe to and unsubscribe from the following events using `addHandler |`AttachmentsChanged`| An attachment has been added to or removed from the item. Only available with task pane implementation. | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | |`EnhancedLocationsChanged`| The location of the selected appointment has changed. Only available with task pane implementation. | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | |`InfobarClicked`| An action has been selected from a notification message. Only available with task pane implementation. | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +|`InitializationContextChanged`| The task pane of an add-in has been opened from an actionable message, `InsightMessage` notification, Smart Alerts dialog, or integrated spam-reporting dialog. Only available with task pane implementation. | [1.15](../requirement-set-1.15/outlook-requirement-set-1.15.md) | |`RecipientsChanged`| The recipient list of the selected item or appointment location has changed. Only available with task pane implementation. | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | |`RecurrenceChanged`| The recurrence pattern of the selected series has changed. Only available with task pane implementation. | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | |`SensitivityLabelChanged`| The sensitivity label of a message or appointment in compose mode has changed. Only available with task pane implementation. | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | diff --git a/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.md b/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.md index 980e4c4f0f..22b340a869 100644 --- a/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.md +++ b/docs/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.md @@ -1,7 +1,7 @@ --- title: Office.context.mailbox - preview requirement set description: Outlook Mailbox API preview requirement set version of the Mailbox object model. -ms.date: 11/14/2024 +ms.date: 01/09/2025 ms.localizationpriority: medium --- @@ -51,7 +51,7 @@ Provides access to the Outlook add-in object model for Microsoft Outlook. | [getCallbackTokenAsync(callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-getcallbacktokenasync-member(2)) | **read item** | Compose
    Read | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md)
    [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | | [getSelectedItemsAsync([options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-getselecteditemsasync-member(1)) | **read/write mailbox** | Compose
    Read | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | | [getUserIdentityTokenAsync(callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-getuseridentitytokenasync-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | -| [loadItemByIdAsync(itemId, [options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) | **read/write item** | Compose
    Read | [Preview](outlook-requirement-set-preview.md) | +| [loadItemByIdAsync(itemId, [options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) | **read/write item** | Compose
    Read | [1.15](../requirement-set-1.15/outlook-requirement-set-1.15.md) | | [makeEwsRequestAsync(data, callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-makeewsrequestasync-member(1)) | **read/write mailbox** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | | [removeHandlerAsync(eventType, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-removehandlerasync-member(1)) | **read item** | Compose
    Read | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | diff --git a/docs/requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md b/docs/requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md index b39435c909..37a68bbdd6 100644 --- a/docs/requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md +++ b/docs/requirement-sets/outlook/preview-requirement-set/outlook-requirement-set-preview.md @@ -1,7 +1,7 @@ --- title: Outlook add-in API preview requirement set description: Features and APIs that are currently in preview for Outlook add-ins. -ms.date: 11/14/2024 +ms.date: 01/09/2025 ms.topic: whats-new ms.localizationpriority: medium --- @@ -20,7 +20,7 @@ To use preview APIs: - You may need to configure the **Targeted release** option on your Microsoft 365 tenant to preview features in Outlook on the web. For more information, see the "Targeted release" section of [Set up the Standard or Targeted release options](/microsoft-365/admin/manage/release-options-in-office-365#targeted-release). -The preview requirement set includes all of the features of [requirement set 1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md). +The preview requirement set includes all of the features of [requirement set 1.15](../requirement-set-1.15/outlook-requirement-set-1.15.md). > [!IMPORTANT] > This documentation is for a **preview** [requirement set](../outlook-api-requirement-sets.md). This requirement set isn't fully implemented yet, and clients won't accurately report support for it. You shouldn't specify this requirement set in your add-in manifest. @@ -75,46 +75,6 @@ Added a new property that represents if an appointment is an all-day event. --- -### Item multi-select: Get additional message properties and run operations on multiple selected messages - -#### [Office.context.mailbox.loadItemByIdAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) - -Added a new method to get additional properties and run operations on selected messages. - -**Available in**: Classic Outlook on Windows (Microsoft 365 subscription) - -#### [Office.LoadedMessageCompose](/javascript/api/outlook/office.loadedmessagecompose?view=outlook-js-preview&preserve-view=true) - -Added a new object that represents the properties and methods of a selected message in compose mode. - -**Available in**: Classic Outlook on Windows (Microsoft 365 subscription) - -#### [Office.LoadedMessageRead](/javascript/api/outlook/office.loadedmessageread?view=outlook-js-preview&preserve-view=true) - -Added a new object that represents the properties and methods of a selected message in read mode. - -**Available in**: Classic Outlook on Windows (Microsoft 365 subscription) - -
    - ---- - ---- - -### Smart Alerts: Format the dialog message using Markdown - -#### [Office.SmartAlertsEventCompletedOptions.errorMessageMarkdown](/javascript/api/outlook/office.smartalertseventcompletedoptions?view=outlook-js-preview&preserve-view=true#outlook-office-smartalertseventcompletedoptions-errormessagemarkdown-member) - -Added an `event.completed` option to format a message in a Smart Alerts dialog using Markdown. To learn more, see the [Smart Alerts walkthrough](/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough) and [Limitations to formatting the dialog message using Markdown](/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#limitations-to-formatting-the-dialog-message-using-markdown). - -**Available in**: Classic Outlook on Windows (Microsoft 365 subscription) - -
    - ---- - ---- - ### Temporarily set the body or subject displayed in read mode #### [Office.context.mailbox.item.display](/javascript/api/outlook/office.messageread?view=outlook-js-preview&preserve-view=true#outlook-office-messageread-display-member) diff --git a/docs/requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md b/docs/requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md index 945f0e6d00..118226c807 100644 --- a/docs/requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md +++ b/docs/requirement-sets/outlook/requirement-set-1.14/outlook-requirement-set-1.14.md @@ -1,7 +1,7 @@ --- title: Outlook add-in API requirement set 1.14 description: Requirement set 1.14 for Outlook add-in API. -ms.date: 05/20/2024 +ms.date: 01/09/2025 ms.topic: whats-new ms.localizationpriority: medium --- @@ -10,6 +10,9 @@ ms.localizationpriority: medium The Outlook add-in API subset of the Office JavaScript API includes objects, methods, properties, and events that you can use in an Outlook add-in. +> [!NOTE] +> This documentation is for a [requirement set](../outlook-api-requirement-sets.md) other than the latest requirement set. + ## What's new in 1.14? Requirement set 1.14 includes all of the features of [requirement set 1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md). It added the following features. diff --git a/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item.md b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item.md new file mode 100644 index 0000000000..5546a1e263 --- /dev/null +++ b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item.md @@ -0,0 +1,211 @@ +--- +title: Office.context.mailbox.item - requirement set 1.15 +description: Outlook Mailbox API requirement set 1.15 version of the Item object model. +ms.date: 01/09/2025 +ms.localizationpriority: medium +--- + +# item (Mailbox requirement set 1.15) + +### [Office](office.md)[.context](office.context.md)[.mailbox](office.context.mailbox.md).item + +`item` is used to access the currently selected message, meeting request, or appointment. You can determine the type of the item by using the `itemType` property. + +##### Requirements + +|Requirement|Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)|1.1| +|[Minimum permission level](/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)|**restricted**| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)|Appointment Organizer, Appointment Attendee,
    Message Compose, or Message Read| + +> [!IMPORTANT] +> Android and iOS: There are limitations on when add-ins activate and which APIs are available. To learn more, refer to [Add mobile support to an Outlook add-in](/office/dev/add-ins/outlook/add-mobile-support#compose-mode-and-appointments). + +## Properties + +| Property | Minimum
    permission level | Details by mode | Return type | Minimum
    requirement set | +|---|---|---|---|:---:| +| attachments | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-attachments-member) | Array.<[AttachmentDetails](/javascript/api/outlook/office.attachmentdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-attachments-member) | Array.<[AttachmentDetails](/javascript/api/outlook/office.attachmentdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| bcc | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-bcc-member) | [Recipients](/javascript/api/outlook/office.recipients?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| body | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-body-member) | [Body](/javascript/api/outlook/office.body?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-body-member) | [Body](/javascript/api/outlook/office.body?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-body-member) | [Body](/javascript/api/outlook/office.body?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-body-member) | [Body](/javascript/api/outlook/office.body?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| categories | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-categories-member) | [Categories](/javascript/api/outlook/office.categories?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-categories-member) | [Categories](/javascript/api/outlook/office.categories?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-categories-member) | [Categories](/javascript/api/outlook/office.categories?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-categories-member) | [Categories](/javascript/api/outlook/office.categories?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| cc | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-cc-member) | [Recipients](/javascript/api/outlook/office.recipients?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-cc-member) | Array.<[EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| conversationId | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-conversationid-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-conversationid-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| dateTimeCreated | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-datetimecreated-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-datetimecreated-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| dateTimeModified | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-datetimemodified-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-datetimemodified-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| delayDeliveryTime | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-delaydeliverytime-member) | [DelayDeliveryTime](/javascript/api/outlook/office.delaydeliverytime?view=outlook-js-1.15&preserve-view=true) | [1.13](../requirement-set-1.13/../requirement-set-1.13/outlook-requirement-set-1.13.md) | +| end | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-end-member) | [Time](/javascript/api/outlook/office.time?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-end-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-end-member)
    (Meeting Request) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| enhancedLocation | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-enhancedlocation-member) | [EnhancedLocation](/javascript/api/outlook/office.enhancedlocation?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-enhancedlocation-member) | [EnhancedLocation](/javascript/api/outlook/office.enhancedlocation?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| from | **read/write item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-from-member) | [From](/javascript/api/outlook/office.from?view=outlook-js-1.15&preserve-view=true) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | **read item** | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-from-member) | [EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| inReplyTo | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-inreplyto-member) | String | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| internetHeaders | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-internetheaders-member) | [InternetHeaders](/javascript/api/outlook/office.internetheaders?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| internetMessageId | **read item** | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-internetmessageid-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| itemClass | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-itemclass-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-itemclass-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| itemId | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-itemid-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-itemid-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| itemType | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-itemtype-member) | [MailboxEnums.ItemType](/javascript/api/outlook/office.mailboxenums.itemtype?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-itemtype-member) | [MailboxEnums.ItemType](/javascript/api/outlook/office.mailboxenums.itemtype?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-itemtype-member) | [MailboxEnums.ItemType](/javascript/api/outlook/office.mailboxenums.itemtype?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-itemtype-member) | [MailboxEnums.ItemType](/javascript/api/outlook/office.mailboxenums.itemtype?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| location | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-location-member) | [Location](/javascript/api/outlook/office.location?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-location-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-location-member)
    (Meeting Request) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| normalizedSubject | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-normalizedsubject-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-normalizedsubject-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| notificationMessages | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-notificationmessages-member) | [NotificationMessages](/javascript/api/outlook/office.notificationmessages?view=outlook-js-1.15&preserve-view=true) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-notificationmessages-member) | [NotificationMessages](/javascript/api/outlook/office.notificationmessages?view=outlook-js-1.15&preserve-view=true) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-notificationmessages-member) | [NotificationMessages](/javascript/api/outlook/office.notificationmessages?view=outlook-js-1.15&preserve-view=true) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-notificationmessages-member) | [NotificationMessages](/javascript/api/outlook/office.notificationmessages?view=outlook-js-1.15&preserve-view=true) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| optionalAttendees | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-optionalattendees-member) | [Recipients](/javascript/api/outlook/office.recipients?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-optionalattendees-member) | Array.<[EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| organizer | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-organizer-member) | [Organizer](/javascript/api/outlook/office.organizer?view=outlook-js-1.15&preserve-view=true) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-organizer-member) | [EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| recurrence | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-recurrence-member) | [Recurrence](/javascript/api/outlook/office.recurrence?view=outlook-js-1.15&preserve-view=true) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-recurrence-member) | [Recurrence](/javascript/api/outlook/office.recurrence?view=outlook-js-1.15&preserve-view=true) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-recurrence-member)
    (Meeting Request) | [Recurrence](/javascript/api/outlook/office.recurrence?view=outlook-js-1.15&preserve-view=true) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| requiredAttendees | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-requiredattendees-member) | [Recipients](/javascript/api/outlook/office.recipients?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-requiredattendees-member) | Array.<[EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| sender | **read item** | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-sender-member) | [EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| sensitivity | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-sensitivity-member) | [Sensitivity](/javascript/api/outlook/office.sensitivity?view=outlook-js-1.15&preserve-view=true) |[1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-sensitivity-member) | [MailboxEnums.AppointmentSensitivityType](/javascript/api/outlook/office.mailboxenums.appointmentsensitivitytype?view=outlook-js-1.15&preserve-view=true) | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| sensitivityLabel | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-sensitivitylabel-member) | [SensitivityLabel](/javascript/api/outlook/office.sensitivitylabel?view=outlook-js-1.15&preserve-view=true) | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-sensitivitylabel-member) | [SensitivityLabel](/javascript/api/outlook/office.sensitivitylabel?view=outlook-js-1.15&preserve-view=true) | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | +| seriesId | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-seriesid-member) | String | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-seriesid-member) | String | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-seriesid-member) | String | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-seriesid-member) | String | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| sessionData | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-sessiondata-member) | [SessionData](/javascript/api/outlook/office.sessiondata?view=outlook-js-1.15&preserve-view=true) | [1.11](../requirement-set-1.11/outlook-requirement-set-1.11.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-sessiondata-member) | [SessionData](/javascript/api/outlook/office.sessiondata?view=outlook-js-1.15&preserve-view=true) | [1.11](../requirement-set-1.11/outlook-requirement-set-1.11.md) | +| start | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-start-member) | [Time](/javascript/api/outlook/office.time?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-start-member) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-start-member)
    (Meeting Request) | Date | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| subject | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-subject-member) | [Subject](/javascript/api/outlook/office.subject?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-subject-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-subject-member) | [Subject](/javascript/api/outlook/office.subject?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-subject-member) | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| to | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-to-member) | [Recipients](/javascript/api/outlook/office.recipients?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-to-member) | Array.<[EmailAddressDetails](/javascript/api/outlook/office.emailaddressdetails?view=outlook-js-1.15&preserve-view=true)> | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | + +## Methods + +| Method | Minimum
    permission level | Details by mode | Minimum
    requirement set | +|---|---|---|:---:| +| addFileAttachmentAsync(uri, attachmentName, [options], [callback]) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-addfileattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md)
    (classic Windows, Mac)

    [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (Web, new Windows) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-addfileattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md)
    (classic Windows, Mac)

    [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (Web, new Windows) | +| addFileAttachmentFromBase64Async(base64File, attachmentName, [options], [callback]) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-addfileattachmentfrombase64async-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-addfileattachmentfrombase64async-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| addHandlerAsync(eventType, handler, [options], [callback]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-addhandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-addhandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-addhandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-addhandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| addItemAttachmentAsync(itemId, attachmentName, [options], [callback]) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-additemattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-additemattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| close() | **restricted** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-close-member(1)) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-close-member(1)) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| closeAsync([options], [callback]) | **read/write item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-closeasync-member(1))| [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| disableClientSignatureAsync([options], [callback]) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-disableclientsignatureasync-member(1)) | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-disableclientsignatureasync-member(1)) | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +| displayReplyAllForm(formData) | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-displayreplyallform-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-displayreplyallform-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| displayReplyAllFormAsync(formData, [options], [callback]) | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-displayreplyallformasync-member(1)) | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-displayreplyallformasync-member(1)) | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| displayReplyForm(formData) | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-displayreplyform-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-displayreplyform-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| displayReplyFormAsync(formData, [options], [callback]) | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-displayreplyformasync-member(1)) | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-displayreplyformasync-member(1)) | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| getAllInternetHeadersAsync([options], [callback]) | **read item** | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getallinternetheadersasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| getAsFileAsync([options], callback) | **read item** | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getasfileasync-member(1)) | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| getAttachmentContentAsync(attachmentId, [options], [callback]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getattachmentcontentasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getattachmentcontentasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getattachmentcontentasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getattachmentcontentasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| getAttachmentsAsync([options], [callback]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getattachmentsasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getattachmentsasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| getComposeTypeAsync([options], callback) | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getcomposetypeasync-member(1)) | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +| getConversationIndexAsync([options], callback) | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getconversationindexasync-member(1)) | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| getEntities() **(deprecated)** | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getentities-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getentities-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| getEntitiesByType(entityType) **(deprecated)** | **restricted** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getentitiesbytype-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getentitiesbytype-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| getFilteredEntitiesByName(name) **(deprecated)** | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getfilteredentitiesbyname-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getfilteredentitiesbyname-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| getInitializationContextAsync([options], [callback]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getinitializationcontextasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getinitializationcontextasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getinitializationcontextasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getinitializationcontextasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| getItemClassAsync([options], callback) | **read item** | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getitemclassasync-member(1)) | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | +| getItemIdAsync([options], callback) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getitemidasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getitemidasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| getRegExMatches() | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getregexmatches-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getregexmatches-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| getRegExMatchesByName(name) | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getregexmatchesbyname-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getregexmatchesbyname-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| getSelectedDataAsync(coercionType, [options], callback) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getselecteddataasync-member(1)) | [1.2](../requirement-set-1.2/outlook-requirement-set-1.2.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getselecteddataasync-member(1)) | [1.2](../requirement-set-1.2/outlook-requirement-set-1.2.md) | +| getSelectedEntities() **(deprecated)** | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getselectedentities-member(1)) | [1.6](../requirement-set-1.6/outlook-requirement-set-1.6.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getselectedentities-member(1)) | [1.6](../requirement-set-1.6/outlook-requirement-set-1.6.md) | +| getSelectedRegExMatches() | **read item** | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getselectedregexmatches-member(1)) | [1.6](../requirement-set-1.6/outlook-requirement-set-1.6.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getselectedregexmatches-member(1)) | [1.6](../requirement-set-1.6/outlook-requirement-set-1.6.md) | +| getSharedPropertiesAsync([options], callback) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-getsharedpropertiesasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (shared folder support)

    [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md)
    (shared mailbox support) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-getsharedpropertiesasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (shared folder support)

    [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md)
    (shared mailbox support) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-getsharedpropertiesasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (shared folder support)

    [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md)
    (shared mailbox support) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-getsharedpropertiesasync-member(1)) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md)
    (shared folder support)

    [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md)
    (shared mailbox support) | +| isClientSignatureEnabledAsync([options], callback) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-isclientsignatureenabledasync-member(1)) | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-isclientsignatureenabledasync-member(1)) | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +| loadCustomPropertiesAsync(callback, [userContext]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-loadcustompropertiesasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-loadcustompropertiesasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-loadcustompropertiesasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-loadcustompropertiesasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| removeAttachmentAsync(attachmentId, [options], [callback]) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-removeattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-removeattachmentasync-member(1)) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| removeHandlerAsync(eventType, [options], [callback]) | **read item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-removehandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Appointment Attendee](/javascript/api/outlook/office.appointmentread?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentread-removehandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-removehandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| | | [Message Read](/javascript/api/outlook/office.messageread?view=outlook-js-1.15&preserve-view=true#outlook-office-messageread-removehandlerasync-member(1)) | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +| saveAsync([options], callback) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-saveasync-member(1)) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-saveasync-member(1)) | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| setSelectedDataAsync(data, [options], callback) | **read/write item** | [Appointment Organizer](/javascript/api/outlook/office.appointmentcompose?view=outlook-js-1.15&preserve-view=true#outlook-office-appointmentcompose-setselecteddataasync-member(1)) | [1.2](../requirement-set-1.2/outlook-requirement-set-1.2.md) | +| | | [Message Compose](/javascript/api/outlook/office.messagecompose?view=outlook-js-1.15&preserve-view=true#outlook-office-messagecompose-setselecteddataasync-member(1)) | [1.2](../requirement-set-1.2/outlook-requirement-set-1.2.md) | + +## Events + +You can subscribe to and unsubscribe from the following events using `addHandlerAsync` and `removeHandlerAsync` respectively. + +| [Event](/javascript/api/office/office.eventtype?view=outlook-js-1.15&preserve-view=true) | Description | Minimum
    requirement set | +|---|---|:---:| +|`AppointmentTimeChanged`| The date or time of the selected appointment or series has changed. Only available with task pane implementation. | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +|`AttachmentsChanged`| An attachment has been added to or removed from the item. Only available with task pane implementation. | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +|`EnhancedLocationsChanged`| The location of the selected appointment has changed. Only available with task pane implementation. | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +|`InfobarClicked`| An action has been selected from a notification message. Only available with task pane implementation. | [1.10](../requirement-set-1.10/outlook-requirement-set-1.10.md) | +|`InitializationContextChanged`| The task pane of an add-in has been opened from an actionable message, `InsightMessage` notification, Smart Alerts dialog, or integrated spam-reporting dialog. Only available with task pane implementation. | [1.15](outlook-requirement-set-1.15.md) | +|`RecipientsChanged`| The recipient list of the selected item or appointment location has changed. Only available with task pane implementation. | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +|`RecurrenceChanged`| The recurrence pattern of the selected series has changed. Only available with task pane implementation. | [1.7](../requirement-set-1.7/outlook-requirement-set-1.7.md) | +|`SensitivityLabelChanged`| The sensitivity label of a message or appointment in compose mode has changed. Only available with task pane implementation. | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | +|`SpamReporting`| An unsolicited message has been reported in Outlook. Only available with a function command. | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | + +## Example + +The following JavaScript code example shows how to access the `subject` property of the current item in Outlook. + +```js +const item = Office.context.mailbox.item; +const subject = item.subject; +console.log(subject); +``` diff --git a/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.md b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.md new file mode 100644 index 0000000000..9a1c972baa --- /dev/null +++ b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.md @@ -0,0 +1,68 @@ +--- +title: Office.context.mailbox - requirement set 1.15 +description: Outlook Mailbox API requirement set 1.15 version of the Mailbox object model. +ms.date: 01/09/2025 +ms.localizationpriority: medium +--- + +# mailbox (Mailbox requirement set 1.15) + +### [Office](office.md)[.context](office.context.md).mailbox + +Provides access to the Outlook add-in object model for Microsoft Outlook. + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Minimum permission level](/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)| **restricted**| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +## Properties + +| Property | Minimum
    permission level | Modes | Return type | Minimum
    requirement set | +|---|---|---|---|:---:| +| [diagnostics](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-diagnostics-member) | **read item** | Compose
    Read | [Diagnostics](/javascript/api/outlook/office.diagnostics?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [ewsUrl](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-ewsurl-member) | **read item** | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [item](office.context.mailbox.item.md) | **restricted** | Compose
    Read | [Item](/javascript/api/outlook/office.item?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [masterCategories](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-mastercategories-member) | **read/write mailbox** | Compose
    Read | [MasterCategories](/javascript/api/outlook/office.mastercategories?view=outlook-js-1.15&preserve-view=true) | [1.8](../requirement-set-1.8/outlook-requirement-set-1.8.md) | +| [restUrl](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-resturl-member) | **read item** | Compose
    Read | String | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [userProfile](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-userprofile-member) | **read item** | Compose
    Read | [UserProfile](/javascript/api/outlook/office.userprofile?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | + +## Methods + +| Method | Minimum
    permission level | Modes | Minimum
    requirement set | +|---|---|---|:---:| +| [addHandlerAsync(eventType, handler, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-addhandlerasync-member(1)) | **read item** | Compose
    Read | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [convertToEwsId(id, restVersion)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-converttoewsid-member(1)) | **restricted** | Compose
    Read | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| [convertToLocalClientTime(timeValue)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-converttolocalclienttime-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [convertToRestId(id, restVersion)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-converttorestid-member(1)) | **restricted** | Compose
    Read | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md) | +| [convertToUtcClientTime(input)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-converttoutcclienttime-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [displayAppointmentForm(itemId)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displayappointmentform-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [displayAppointmentFormAsync(itemId, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displayappointmentformasync-member(1)) | **read item** | Compose
    Read | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| [displayMessageForm(itemId)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaymessageform-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [displayMessageFormAsync(itemId, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaymessageformasync-member(1)) | **read item** | Compose
    Read | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| [displayNewAppointmentForm(parameters)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaynewappointmentform-member(1)) | **read item** | Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [displayNewAppointmentFormAsync(parameters, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaynewappointmentformasync-member(1)) | **read item** | Read | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| [displayNewMessageForm(parameters)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaynewmessageform-member(1)) | **read item** | Read | [1.6](../requirement-set-1.6/outlook-requirement-set-1.6.md) | +| [displayNewMessageFormAsync(parameters, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-displaynewmessageformasync-member(1)) | **read item** | Read | [1.9](../requirement-set-1.9/outlook-requirement-set-1.9.md) | +| [getCallbackTokenAsync([options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-getcallbacktokenasync-member(1)) | **read item** | Compose
    Read | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [getCallbackTokenAsync(callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-getcallbacktokenasync-member(2)) | **read item** | Compose
    Read | [1.3](../requirement-set-1.3/outlook-requirement-set-1.3.md)
    [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [getSelectedItemsAsync([options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-getselecteditemsasync-member(1)) | **read/write mailbox** | Compose
    Read | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | +| [getUserIdentityTokenAsync(callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-getuseridentitytokenasync-member(1)) | **read item** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [loadItemByIdAsync(itemId, [options], callback)](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) | **read/write item** | Compose
    Read | [1.15](outlook-requirement-set-1.15.md) | +| [makeEwsRequestAsync(data, callback, [userContext])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-makeewsrequestasync-member(1)) | **read/write mailbox** | Compose
    Read | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [removeHandlerAsync(eventType, [options], [callback])](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-removehandlerasync-member(1)) | **read item** | Compose
    Read | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | + +## Events + +You can subscribe to and unsubscribe from the following events using [addHandlerAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-addhandlerasync-member(1)) and [removeHandlerAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-removehandlerasync-member(1)) respectively. + +> [!IMPORTANT] +> Events are only available with task pane implementation. + +| [Event](/javascript/api/office/office.eventtype?view=outlook-js-1.15&preserve-view=true) | Description | Minimum
    requirement set | +|---|---|:---:| +|`ItemChanged`| A different Outlook item is selected for viewing while the task pane is pinned. | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +|`SelectedItemsChanged`| One or more messages are selected or deselected. | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | diff --git a/docs/requirement-sets/outlook/requirement-set-1.15/office.context.md b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.md new file mode 100644 index 0000000000..b366b654fb --- /dev/null +++ b/docs/requirement-sets/outlook/requirement-set-1.15/office.context.md @@ -0,0 +1,404 @@ +--- +title: Office.context - requirement set 1.15 +description: Office.Context object members available for Outlook add-ins using Mailbox API requirement set 1.15. +ms.date: 01/09/2025 +ms.localizationpriority: medium +--- + +# context (Mailbox requirement set 1.15) + +### [Office](office.md).context + +Office.context provides shared interfaces that are used by add-ins in all of the Office apps. This listing documents only those interfaces that are used by Outlook add-ins. For a full listing of the Office.context namespace, see the [Office.context reference in the Common API](/javascript/api/office/office.context?view=outlook-js-1.15&preserve-view=true). + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +## Properties + +| Property | Modes | Return type | Minimum
    requirement set | +|---|---|---|:---:| +| [auth](#auth-auth) | Compose
    Read | [Auth](/javascript/api/office/office.auth?view=outlook-js-1.15&preserve-view=true) | [IdentityAPI 1.3](../../common/identity-api-requirement-sets.md) | +| [contentLanguage](#contentlanguage-string) | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [diagnostics](#diagnostics-contextinformation) | Compose
    Read | [ContextInformation](/javascript/api/office/office.contextinformation?view=outlook-js-1.15&preserve-view=true) | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [displayLanguage](#displaylanguage-string) | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [host](#host-hosttype) | Compose
    Read | [HostType](/javascript/api/office/office.hosttype?view=outlook-js-1.15&preserve-view=true) | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [mailbox](office.context.mailbox.md) | Compose
    Read | [Mailbox](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [platform](#platform-platformtype) | Compose
    Read | [PlatformType](/javascript/api/office/office.platformtype?view=outlook-js-1.15&preserve-view=true) | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [requirements](#requirements-requirementsetsupport) | Compose
    Read | [RequirementSetSupport](/javascript/api/office/office.requirementsetsupport?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [roamingSettings](#roamingsettings-roamingsettings) | Compose
    Read | [RoamingSettings](/javascript/api/outlook/office.roamingsettings?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [sensitivityLabelsCatalog](#sensitivitylabelscatalog-sensitivitylabelscatalog) | Compose | [SensitivityLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog?view=outlook-js-1.15&preserve-view=true) | [1.13](../requirement-set-1.13/outlook-requirement-set-1.13.md) | +| [ui](#ui-ui) | Compose
    Read | [UI](/javascript/api/office/office.ui?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [urls](#ui-ui) | Compose
    Read | [UI](/javascript/api/office/office.ui?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | + +## Property details + +#### auth: [Auth](/javascript/api/office/office.auth?view=outlook-js-1.15&preserve-view=true) + +Supports [single sign-on (SSO)](/office/dev/add-ins/outlook/authenticate-a-user-with-an-sso-token) by providing a method that allows the Office application to obtain an access token to the add-in's web application. Indirectly, this also enables the add-in to access the signed-in user's Microsoft Graph data without requiring the user to sign in a second time. + +##### Type + +* [Auth](/javascript/api/office/office.auth?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.10| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +Office.context.auth.getAccessTokenAsync(function(result) { + if (result.status === "succeeded") { + var token = result.value; + // ... + } else { + console.log("Error obtaining token", result.error); + } +}); +``` + +
    + +--- +--- + +#### contentLanguage: String + +Gets the locale (language) specified by the user for editing the item. + +The `contentLanguage` value reflects the current **Editing Language** setting specified with **File > Options > Language** in the Office client application. + +##### Type + +* String + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +function sayHelloWithContentLanguage() { + var myContentLanguage = Office.context.contentLanguage; + switch (myContentLanguage) { + case 'en-US': + write('Hello!'); + break; + case 'en-NZ': + write('G\'day mate!'); + break; + } +} + +// Function that writes to a div with id='message' on the page. +function write(message){ + document.getElementById('message').innerText += message; +} +``` + +
    + +--- +--- + +#### diagnostics: [ContextInformation](/javascript/api/office/office.contextinformation?view=outlook-js-1.15&preserve-view=true) + +Gets information about the environment in which the add-in is running. + +> [!NOTE] +> For all Mailbox requirement sets, you can also use the [Office.context.mailbox.diagnostics](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-diagnostics-member) property to get similar information. + +##### Type + +* [ContextInformation](/javascript/api/office/office.contextinformation?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +var contextInfo = Office.context.diagnostics; +console.log("Office application: " + contextInfo.host); +console.log("Office version: " + contextInfo.version); +console.log("Platform: " + contextInfo.platform); +``` + +
    + +--- +--- + +#### displayLanguage: String + +Gets the locale (language) in RFC 1766 Language tag format specified by the user for the UI of the Office client application. + +The `displayLanguage` value reflects the current **Display Language** setting specified with **File** > **Options** > **Language** in the Office client application. + +##### Type + +* String + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +function sayHelloWithDisplayLanguage() { + var myDisplayLanguage = Office.context.displayLanguage; + switch (myDisplayLanguage) { + case 'en-US': + write('Hello!'); + break; + case 'en-NZ': + write('G\'day mate!'); + break; + } +} + +// Function that writes to a div with id='message' on the page. +function write(message){ + document.getElementById('message').innerText += message; +} +``` + +
    + +--- +--- + +#### host: [HostType](/javascript/api/office/office.hosttype?view=outlook-js-1.15&preserve-view=true) + +Gets the Office application that is hosting the add-in. + +> [!NOTE] +> Alternatively, you can use the [Office.context.diagnostics](#diagnostics-contextinformation) property to get the host. For all Mailbox requirement sets, you can also use the [Office.context.mailbox.diagnostics](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-diagnostics-member) property to get similar information. + +##### Type + +* [HostType](/javascript/api/office/office.hosttype?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +console.log(JSON.stringify(Office.context.host)); +``` + +
    + +--- +--- + +#### officeTheme: [OfficeTheme](/javascript/api/office/office.officetheme?view=outlook-js-1.15&preserve-view=true) + +Provides access to the properties for Office theme colors. + +##### Type + +* [OfficeTheme](/javascript/api/office/office.officetheme?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.14| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +function applyOfficeTheme() { + // Get office theme colors. + const bodyBackgroundColor = Office.context.officeTheme.bodyBackgroundColor; + const bodyForegroundColor = Office.context.officeTheme.bodyForegroundColor; + const controlBackgroundColor = Office.context.officeTheme.controlBackgroundColor; + const controlForegroundColor = Office.context.officeTheme.controlForegroundColor; + + // Apply body background color to a CSS class. + $('.body').css('background-color', bodyBackgroundColor); +} +``` + +
    + +--- +--- + +#### platform: [PlatformType](/javascript/api/office/office.platformtype) + +Provides the platform on which the add-in is running. + +> [!NOTE] +> Alternatively, you can use the [Office.context.diagnostics](#diagnostics-contextinformation) property to get the platform. For all Mailbox requirement sets, you can also use the [Office.context.mailbox.diagnostics](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-diagnostics-member) property to get similar information. + +##### Type + +* [PlatformType](/javascript/api/office/office.platformtype?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +console.log(JSON.stringify(Office.context.platform)); +``` + +
    + +--- +--- + +#### requirements: [RequirementSetSupport](/javascript/api/office/office.requirementsetsupport?view=outlook-js-1.15&preserve-view=true) + +Provides a method for determining what requirement sets are supported on the current application and platform. + +##### Type + +* [RequirementSetSupport](/javascript/api/office/office.requirementsetsupport?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +console.log(JSON.stringify(Office.context.requirements.isSetSupported("mailbox", "1.1"))); +``` + +
    + +--- +--- + +#### roamingSettings: [RoamingSettings](/javascript/api/outlook/office.roamingsettings?view=outlook-js-1.15&preserve-view=true) + +Gets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. + +The `RoamingSettings` object lets you store and access data for a mail add-in that is stored in a user's mailbox, so that is available to that add-in when it is running from any Outlook client used to access that mailbox. + +##### Type + +* [RoamingSettings](/javascript/api/outlook/office.roamingsettings?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Minimum permission level](/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)| **restricted**| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +
    + +--- +--- + +#### sensitivityLabelsCatalog: [SensitivityLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog?view=outlook-js-1.15&preserve-view=true) + +Gets the object to check the status of the catalog of sensitivity labels in Outlook and retrieve all available sensitivity labels if the catalog is enabled. + +##### Type + +* [SensitivityLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.13| +|[Minimum permission level](/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)| **read/write item** | +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose| + +
    + +--- +--- + +#### ui: [UI](/javascript/api/office/office.ui?view=outlook-js-1.15&preserve-view=true) + +Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes, in your Office Add-ins. + +##### Type + +* [UI](/javascript/api/office/office.ui?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +
    + +--- +--- + +#### urls: [Urls](/javascript/api/office/office.urls?view=outlook-js-1.15&preserve-view=true) + +Provides the object to retrieve the runtime URLs of an add-in. + +##### Type + +* [Urls](/javascript/api/office/office.urls?view=outlook-js-1.15&preserve-view=true) + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.14| +|[Minimum permission level](/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)| **restricted** | +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +##### Example + +```js +const url = Office.context.urls.javascriptRuntimeUrl; +const regex = /=([^&]+)/; +console.log(`First parameter value: ${url.match(regex)[1]}`); +``` + +## Events + +You can subscribe to and unsubscribe from the following events using [addHandlerAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-addhandlerasync-member(1)) and [removeHandlerAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-removehandlerasync-member(1)) respectively. + +| [Event](/javascript/api/office/office.eventtype?view=outlook-js-1.15&preserve-view=true) | Description | Minimum
    requirement set | +|---|---|:---:| +|`OfficeThemeChanged`| The Office theme in Outlook changed. Only available with task pane implementation. | [1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md) | diff --git a/docs/requirement-sets/outlook/requirement-set-1.15/office.md b/docs/requirement-sets/outlook/requirement-set-1.15/office.md new file mode 100644 index 0000000000..ddd68143bf --- /dev/null +++ b/docs/requirement-sets/outlook/requirement-set-1.15/office.md @@ -0,0 +1,210 @@ +--- +title: Office namespace - requirement set 1.15 +description: Office namespace members available for Outlook add-ins using Mailbox API requirement set 1.15. +ms.date: 01/09/2025 +ms.localizationpriority: medium +--- + +# Office (Mailbox requirement set 1.15) + +The Office namespace provides shared interfaces that are used by add-ins in all of the Office apps. This listing documents only those interfaces that are used by Outlook add-ins. For a full listing of the Office namespace, see the [Common API](/javascript/api/office?view=outlook-js-1.15&preserve-view=true). + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +## Properties + +| Property | Modes | Return type | Minimum
    requirement set | +|---|---|---|:---:| +| [context](office.context.md) | Compose
    Read | [Context](/javascript/api/office/office.context?view=outlook-js-1.15&preserve-view=true) | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | + +## Enumerations + +| Enumeration | Modes | Return type | Minimum
    requirement set | +|---|---|---|:---:| +| [AsyncResultStatus](#asyncresultstatus-string) | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [CoercionType](#coerciontype-string) | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | +| [EventType](#eventtype-string) | Compose
    Read | String | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [HostType](#hosttype-string) | Compose
    Read | String | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [PlatformType](#platformtype-string) | Compose
    Read | String | [1.5](../requirement-set-1.5/outlook-requirement-set-1.5.md) | +| [SourceProperty](#sourceproperty-string) | Compose
    Read | String | [1.1](../requirement-set-1.1/outlook-requirement-set-1.1.md) | + +## Namespaces + +[MailboxEnums](/javascript/api/outlook/office.mailboxenums.attachmentcontentformat?view=outlook-js-1.15&preserve-view=true): Includes a number of Outlook-specific enumerations, for example, `ItemType`, `EntityType`, `AttachmentType`, `RecipientType`, `ResponseType`, and `ItemNotificationMessageType`. + +## Enumeration details + +#### AsyncResultStatus: String + +Specifies the result of an asynchronous call. + +##### Type + +* String + +##### Properties + +|Name| Type| Description| +|---|---|---| +|`Succeeded`| String|The call succeeded.| +|`Failed`| String|The call failed.| + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +
    + +--- +--- + +#### CoercionType: String + +Specifies how to coerce data returned or set by the invoked method. + +##### Type + +* String + +##### Properties + +|Name| Type| Description| +|---|---|---| +|`Html`| String|Requests the data be returned in HTML format.| +|`Text`| String|Requests the data be returned in text format.| + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +
    + +--- +--- + +#### EventType: String + +Specifies the event associated with an event handler. + +##### Type + +* String + +##### Properties + +| Name | Type | Description | Minimum requirement set | +|---|---|---|:---:| +|`AppointmentTimeChanged`| String | The date or time of the selected appointment or series has changed. | 1.7 | +|`AttachmentsChanged`| String | An attachment has been added to or removed from the item. | 1.8 | +|`EnhancedLocationsChanged`| String | The location of the selected appointment has changed. | 1.8 | +|`InfobarClicked`| String | An action on a notification message is selected. | 1.10 | +|`InitializationContextChanged`| String | An add-in's task pane is opened from an actionable message, `InsightMessage` notification, Smart Alerts dialog, or integrated spam-reporting dialog. | 1.15 | +|`ItemChanged`| String | A different Outlook item is selected for viewing while the task pane is pinned. | 1.5 | +|`OfficeThemeChanged`| String | The Office theme in Outlook has changed. | 1.14 | +|`RecipientsChanged`| String | The recipient list of the selected item or appointment location has changed. | 1.7 | +|`RecurrenceChanged`| String | The recurrence pattern of the selected series has changed. | 1.7 | +|`SelectedItemsChanged`| String | One or more messages are selected or deselected. | 1.13 | +|`SensitivityLabelChanged`| String | The sensitivity label of a message or appointment has changed. | 1.13 | +|`SpamReporting`| String | An unsolicited message has been reported in Outlook. | 1.14 | + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5 | +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| + +
    + +--- +--- + +#### HostType: String + +Specifies the host Office application in which the add-in is running. + +##### Type + +* String + +##### Properties + +| Name | Type | Description | Minimum requirement set | +|---|---|---|:---:| +|`Outlook`| String | The Office host is Microsoft Outlook. | 1.5 | + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5 | +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read | + +
    + +--- +--- + +#### PlatformType: String + +Specifies the OS or other platform on which the Office host application is running. + +##### Type + +* String + +##### Properties + +| Name | Type | Description | Minimum requirement set | +|---|---|---|:---:| +|`Android`| String | The platform is an Android device. | 1.5 | +|`iOS`| String | The platform is an iOS device. | 1.5 | +|`Mac`| String | The platform is Mac. | 1.5 | +|`OfficeOnline`| String | The platform is Office on the web (in a browser). | 1.5 | +|`PC`| String | The platform is PC (Windows). | 1.5 | +|`Universal`| String | The platform is WinRT. | 1.5 | + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.5 | +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read | + +
    + +--- +--- + +#### SourceProperty: String + +Specifies the source of the data returned by the invoked method. + +##### Type + +* String + +##### Properties + +|Name| Type| Description| +|---|---|---| +|`Body`| String|The source of the data is from the body of a message.| +|`Subject`| String|The source of the data is from the subject of a message.| + +##### Requirements + +|Requirement| Value| +|---|---| +|[Minimum mailbox requirement set version](../outlook-api-requirement-sets.md)| 1.1| +|[Applicable Outlook mode](/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)| Compose or Read| diff --git a/docs/requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md b/docs/requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md new file mode 100644 index 0000000000..0788423548 --- /dev/null +++ b/docs/requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md @@ -0,0 +1,46 @@ +--- +title: Outlook add-in API requirement set 1.15 +description: Requirement set 1.15 for Outlook add-in API. +ms.date: 01/09/2025 +ms.topic: whats-new +ms.localizationpriority: medium +--- + +# Outlook add-in API requirement set 1.15 + +The Outlook add-in API subset of the Office JavaScript API includes objects, methods, properties, and events that you can use in an Outlook add-in. + +## What's new in 1.15? + +Requirement set 1.15 includes all of the features of [requirement set 1.14](../requirement-set-1.14/outlook-requirement-set-1.14.md). It added the following features. + +- Added support for radio buttons to format reporting options in the [integrated spam-reporting](/office/dev/add-ins/outlook/spam-reporting) dialog. +- Added support to include a "Don't show this message again" checkbox in a spam-reporting dialog that doesn't require input from a user. +- Added support to open a task pane from a spam-reporting dialog. +- Added support for Markdown to format error messages in a [Smart Alerts](/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events) dialog. +- Added a method to load a single message from multiple selected messages to get its properties or perform operations on it. +- Added an event that occurs when an add-in's task pane is opened from an [actionable message](/outlook/actionable-messages), [InsightMessage](/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype?view=outlook-js-1.15&preserve-view=true#fields) notification, Smart Alerts dialog, or an integrated spam-reporting dialog. +- Added support for Base64-encoded attachments in reply forms. + +### Change log + +- Added the `inputType` attribute to the [ReportingOptions](/javascript/api/manifest/reportingoptions?view=outlook-js-1.15&preserve-view=true#attributes) element of the add-in only manifest: When implementing the integrated spam-reporting feature, uses radio buttons to format reporting options in the preprocessing dialog. +- Added the [NeverShowAgainOption](/javascript/api/manifest/preprocessingdialog?view=outlook-js-1.15&preserve-view=true#child-elements) add-in only manifest element: When implementing the integrated spam-reporting feature, adds a "Don't show this message again" checkbox to the preprocessing dialog. This checkbox is supported in preprocessing dialogs that don't require input from a user. +- Added new properties to [Office.SpamReportingEventCompletedOptions](/javascript/api/outlook/office.spamreportingeventcompletedoptions?view=outlook-js-1.15&preserve-view=true): Adds the following properties to configure a task pane to open from the **Report** button of the preprocessing dialog. + - [commandId](/javascript/api/outlook/office.spamreportingeventcompletedoptions?view=outlook-js-1.15&preserve-view=true#outlook-office-spamreportingeventcompletedoptions-commandid-member) property: When the **Report** option is selected from a preprocessing dialog, specifies the ID of the task pane that opens. + - [contextData](/javascript/api/outlook/office.spamreportingeventcompletedoptions?view=outlook-js-1.15&preserve-view=true#outlook-office-spamreportingeventcompletedoptions-contextdata-member) property: When the **Report** option is selected from a preprocessing dialog, specifies any JSON data passed to the add-in's task pane for processing. +- Added the [errorMessageMarkdown](/javascript/api/outlook/office.smartalertseventcompletedoptions?view=outlook-js-1.15&preserve-view=true#outlook-office-smartalertseventcompletedoptions-errormessagemarkdown-member) property to [Office.SmartAlertsEventCompletedOptions](/javascript/api/outlook/office.smartalertseventcompletedoptions?view=outlook-js-1.15&preserve-view=true): Supports Markdown to format the error message shown in a Smart Alerts dialog. +- Added the [Office.context.mailbox.loadItemByIdAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) method: When the [item multi-select](/office/dev/add-ins/outlook/item-multi-select) feature is implemented, loads a single item to perform operations on it or get properties that aren't provided by the [getSelectedItemsAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-getselecteditemsasync-member(1)) method. +- Added the [Office.LoadedMessageCompose](/javascript/api/outlook/office.loadedmessagecompose?view=outlook-js-1.15&preserve-view=true) and [Office.LoadedMessageRead](/javascript/api/outlook/office.loadedmessageread?view=outlook-js-1.15&preserve-view=true) objects: Represents the properties and methods of a mail item that's currently loaded using the `loadItemByIdAsync` method. +- Added the [Office.EventType.InitializationContextChanged](/javascript/api/office/office.eventtype?view=outlook-js-1.15&preserve-view=true#fields) event: Occurs when an add-in's task pane is opened from an actionable message, `InsightMessage` notification, Smart Alerts dialog, or integrated spam-reporting dialog. +- Added [Office.InitializationContextChangedEventArgs](/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15&preserve-view=true): When the `Office.EventType.InitializationContextChanged` event occurs, provides data from an actionable message, `InsightMessage` notification, Smart Alerts dialog, or integrated spam-reporting dialog to an add-in's task pane. +- Updated the [type](/javascript/api/outlook/office.replyformattachment?view=outlook-js-1.15&preserve-view=true#outlook-office-replyformattachment-type-member) property of [Office.ReplyFormAttachment](/javascript/api/outlook/office.replyformattachment?view=outlook-js-1.15&preserve-view=true): Now supports Base64-encoded attachments in reply forms. +- Added the [base64File](/javascript/api/outlook/office.replyformattachment?view=outlook-js-1.15&preserve-view=true#outlook-office-replyformattachment-base64file-member) property to `Office.ReplyFormAttachment`: Specifies the Base64-encoded string of the file to be attached to a reply form. +- Added the [Office.MailboxEnums.AttachmentType.Base64](/javascript/api/outlook/office.mailboxenums.attachmenttype?view=outlook-js-1.15&preserve-view=true#fields) enum: Specifies that the attachment is a Base64-encoded file. This attachment type is only supported by the [displayReplyAllForm](office.context.mailbox.item.md#methods), [displayReplyAllFormAsync](office.context.mailbox.item.md#methods), [displayReplyForm](office.context.mailbox.item.md#methods), and [displayReplyFormAsync](office.context.mailbox.item.md#methods) methods. + +## See also + +- [Outlook add-ins](/office/dev/add-ins/outlook/outlook-add-ins-overview) +- [Outlook add-in code samples](https://developer.microsoft.com/outlook/gallery/?filterBy=Outlook,Samples,Add-ins) +- [Get started](/office/dev/add-ins/quickstarts/outlook-quickstart) +- [Requirement sets and supported clients](../outlook-api-requirement-sets.md) diff --git a/docs/requirement-sets/requirement-sets.md b/docs/requirement-sets/requirement-sets.md index 97fd7e691a..f63c5de883 100644 --- a/docs/requirement-sets/requirement-sets.md +++ b/docs/requirement-sets/requirement-sets.md @@ -1,7 +1,7 @@ --- title: Office client application and platform availability for Office Add-ins description: Supported requirement sets for Excel, OneNote, Outlook, PowerPoint, Project, and Word. -ms.date: 12/17/2024 +ms.date: 01/09/2025 ms.topic: overview ms.localizationpriority: high --- @@ -46,11 +46,11 @@ To work as expected, your Office Add-in might depend on a specific Office applic |Platform|Extension points|Application-specific API requirement sets|[Common API requirement sets](common/office-add-in-requirement-sets.md)| |---|---|---|---| -|Office on the web
    (modern)1 2|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    |
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    | +|Office on the web
    (modern)1 2|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    • [Mailbox 1.15](outlook/requirement-set-1.15/outlook-requirement-set-1.15.md)
    |
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    | |Office on the web
    (classic)2|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    |Not available| -|Office on Windows
    ([new desktop client](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627))|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    |
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    | -|Office on Windows
    (Microsoft 365 subscription)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [Modules](../manifest/extensionpoint.md#module)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | -|Office on Windows
    (retail perpetual Office 2016 and later)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [Modules](../manifest/extensionpoint.md#module)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | +|Office on Windows
    ([new desktop client](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627))|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    • [Mailbox 1.15](outlook/requirement-set-1.15/outlook-requirement-set-1.15.md)
    |
    • [DevicePermissionService 1.1](common/device-permission-service-requirement-sets.md)
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    | +|Office on Windows
    (Microsoft 365 subscription)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [Modules](../manifest/extensionpoint.md#module)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    • [Mailbox 1.15](outlook/requirement-set-1.15/outlook-requirement-set-1.15.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [NestedAppAuth 1.1](./common/nested-app-auth-requirement-sets.md)
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | +|Office on Windows
    (retail perpetual Office 2016 and later)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [Modules](../manifest/extensionpoint.md#module)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    • [Mailbox 1.15](outlook/requirement-set-1.15/outlook-requirement-set-1.15.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | |Office 2024 on Windows
    (volume-licensed perpetual)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Launch Event](../manifest/extensionpoint.md#launchevent)
    • [Modules](../manifest/extensionpoint.md#module)
    • [ReportPhishingCommandSurface](../manifest/extensionpoint.md#reportphishingcommandsurface)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    • [Mailbox 1.10](outlook/requirement-set-1.10/outlook-requirement-set-1.10.md)
    • [Mailbox 1.11](outlook/requirement-set-1.11/outlook-requirement-set-1.11.md)
    • [Mailbox 1.12](outlook/requirement-set-1.12/outlook-requirement-set-1.12.md)
    • [Mailbox 1.13](outlook/requirement-set-1.13/outlook-requirement-set-1.13.md)
    • [Mailbox 1.14](outlook/requirement-set-1.14/outlook-requirement-set-1.14.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | |Office 2021 on Windows
    (volume-licensed perpetual)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Modules](../manifest/extensionpoint.md#module)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    • [Mailbox 1.7](outlook/requirement-set-1.7/outlook-requirement-set-1.7.md)
    • [Mailbox 1.8](outlook/requirement-set-1.8/outlook-requirement-set-1.8.md)
    • [Mailbox 1.9](outlook/requirement-set-1.9/outlook-requirement-set-1.9.md)
    |
    • [DialogApi 1.1](common/dialog-api-requirement-sets.md)
    • [DialogApi 1.2](common/dialog-api-requirement-sets.md)
    • [DialogOrigin 1.1](common/dialog-origin-requirement-sets.md)
    • [IdentityAPI 1.3](common/identity-api-requirement-sets.md)3
    • [OpenBrowserWindowApi 1.1](common/open-browser-window-api-requirement-sets.md)
    | |Office 2019 on Windows
    (volume-licensed perpetual)|
    • [Message Read](../manifest/extensionpoint.md#messagereadcommandsurface)
    • [Message Compose](../manifest/extensionpoint.md#messagecomposecommandsurface)
    • [Appointment Attendee (Read)](../manifest/extensionpoint.md#appointmentattendeecommandsurface)
    • [Appointment Organizer (Compose)](../manifest/extensionpoint.md#appointmentorganizercommandsurface)
    • [Add-in Commands](common/add-in-commands-requirement-sets.md)
    • [Modules](../manifest/extensionpoint.md#module)
    |
    • [Mailbox 1.1](outlook/requirement-set-1.1/outlook-requirement-set-1.1.md)
    • [Mailbox 1.2](outlook/requirement-set-1.2/outlook-requirement-set-1.2.md)
    • [Mailbox 1.3](outlook/requirement-set-1.3/outlook-requirement-set-1.3.md)
    • [Mailbox 1.4](outlook/requirement-set-1.4/outlook-requirement-set-1.4.md)
    • [Mailbox 1.5](outlook/requirement-set-1.5/outlook-requirement-set-1.5.md)
    • [Mailbox 1.6](outlook/requirement-set-1.6/outlook-requirement-set-1.6.md)
    |Not available| diff --git a/docs/requirement-sets/toc.yml b/docs/requirement-sets/toc.yml index a8192b17eb..e325d9c2df 100644 --- a/docs/requirement-sets/toc.yml +++ b/docs/requirement-sets/toc.yml @@ -91,6 +91,18 @@ href: ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.md - name: Office.context.mailbox.item href: ../../requirement-sets/outlook/preview-requirement-set/Office.context.mailbox.item.md + - name: Mailbox requirement set 1.15 + items: + - name: Overview + href: ../../requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15.md + - name: Office + href: ../../requirement-sets/outlook/requirement-set-1.15/office.md + - name: Office.context + href: ../../requirement-sets/outlook/requirement-set-1.15/Office.context.md + - name: Office.context.mailbox + href: ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.md + - name: Office.context.mailbox.item + href: ../../requirement-sets/outlook/requirement-set-1.15/Office.context.mailbox.item.md - name: Mailbox requirement set 1.14 items: - name: Overview diff --git a/generate-docs/GenerateDocs.sh b/generate-docs/GenerateDocs.sh index 22df5cfeff..95d17d7bfd 100644 --- a/generate-docs/GenerateDocs.sh +++ b/generate-docs/GenerateDocs.sh @@ -69,6 +69,8 @@ node version-remover ../api-extractor-inputs-excel-release/Excel_1_3/excel.d.ts node version-remover ../api-extractor-inputs-excel-release/Excel_1_2/excel.d.ts "ExcelApi 1.2" ../api-extractor-inputs-excel-release/Excel_1_1/excel.d.ts node version-remover ../api-extractor-inputs-excel-release/Excel_1_1/excel.d.ts "ExcelApi 1.1" ./tool-inputs/excel-base.d.ts +node version-remover ../api-extractor-inputs-outlook-release/outlook_1_15/outlook.d.ts "Mailbox 1.15" ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts +node ../scripts/versioned-dts-cleanup ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts Outlook 1.14 node version-remover ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts "Mailbox 1.14" ../api-extractor-inputs-outlook-release/outlook_1_13/outlook.d.ts node ../scripts/versioned-dts-cleanup ../api-extractor-inputs-outlook-release/outlook_1_13/outlook.d.ts Outlook 1.13 node version-remover ../api-extractor-inputs-outlook-release/outlook_1_13/outlook.d.ts "Mailbox 1.13" ../api-extractor-inputs-outlook-release/outlook_1_12/outlook.d.ts @@ -154,7 +156,8 @@ node whats-new excel ../api-extractor-inputs-excel-release/Excel_1_3/excel.d.ts node whats-new excel ../api-extractor-inputs-excel-release/Excel_1_2/excel.d.ts ../api-extractor-inputs-excel-release/Excel_1_1/excel.d.ts ../../docs/includes/excel-1_2 node whats-new excel ../api-extractor-inputs-excel-release/Excel_1_1/excel.d.ts ./tool-inputs/excel-base.d.ts ../../docs/includes/excel-1_1 -node whats-new outlook ../api-extractor-inputs-outlook/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts ../../docs/includes/outlook-preview +node whats-new outlook ../api-extractor-inputs-outlook/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_15/outlook.d.ts ../../docs/includes/outlook-preview +node whats-new outlook ../api-extractor-inputs-outlook-release/outlook_1_15/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts ../../docs/includes/outlook-1_15 node whats-new outlook ../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_13/outlook.d.ts ../../docs/includes/outlook-1_14 node whats-new outlook ../api-extractor-inputs-outlook-release/outlook_1_13/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_12/outlook.d.ts ../../docs/includes/outlook-1_13 node whats-new outlook ../api-extractor-inputs-outlook-release/outlook_1_12/outlook.d.ts ../api-extractor-inputs-outlook-release/outlook_1_11/outlook.d.ts ../../docs/includes/outlook-1_12 @@ -338,6 +341,12 @@ if [ ! -d "json/outlook" ]; then ../node_modules/.bin/api-extractor run popd fi +if [ ! -d "json/outlook_1_15" ]; then + echo Running API Extractor for Outlook 1.15. + pushd api-extractor-inputs-outlook-release/outlook_1_15 + ../../node_modules/.bin/api-extractor run + popd +fi if [ ! -d "json/outlook_1_14" ]; then echo Running API Extractor for Outlook 1.14. pushd api-extractor-inputs-outlook-release/outlook_1_14 @@ -701,6 +710,9 @@ fi if [ ! -d "yaml/outlook_1_14" ]; then ./node_modules/.bin/api-documenter yaml --input-folder ./json/outlook_1_14 --output-folder ./yaml/outlook_1_14 --office 2>/dev/null fi +if [ ! -d "yaml/outlook_1_15" ]; then + ./node_modules/.bin/api-documenter yaml --input-folder ./json/outlook_1_15 --output-folder ./yaml/outlook_1_15 --office 2>/dev/null +fi if [ ! -d "yaml/powerpoint" ]; then ./node_modules/.bin/api-documenter yaml --input-folder ./json/powerpoint --output-folder ./yaml/powerpoint --office fi diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts index 95d0ed7733..5505db9162 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_1/Outlook.d.ts @@ -2217,6 +2217,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -2780,6 +2782,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts index 7e2092ca6f..fda24eaa51 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_10/outlook.d.ts @@ -5588,6 +5588,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -6751,6 +6753,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts index e813d3d09c..3f2e342e71 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_11/outlook.d.ts @@ -5600,6 +5600,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -6763,6 +6765,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts index 4b936fd6ce..e41ea6f17b 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_12/outlook.d.ts @@ -5600,6 +5600,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -6763,6 +6765,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * @@ -11009,6 +11013,7 @@ export declare namespace Office { */ errorMessage?: string; + } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts index 76de6e60f9..54aa117064 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_13/outlook.d.ts @@ -5799,6 +5799,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -7004,6 +7006,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * @@ -11608,6 +11612,7 @@ export declare namespace Office { */ errorMessage?: string; + } diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts index b4f386dcca..b0abe72835 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_14/outlook.d.ts @@ -5910,6 +5910,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -7115,6 +7117,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * @@ -12178,6 +12182,7 @@ export declare namespace Office { * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ errorMessage?: string; + /** * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler * and set its `allowEvent` property to `false`, this property overrides the diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/api-extractor.json b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/api-extractor.json new file mode 100644 index 0000000000..969b9c5176 --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/api-extractor.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "outlook.d.ts", + "enumMemberOrder": "preserve", + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": true, + "apiJsonFilePath": "../../json/outlook_1_15/.api.json" + }, + "dtsRollup": { + "enabled": false + }, + "messages": { + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-forgotten-export": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/dist/tsdoc-metadata.json b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/dist/tsdoc-metadata.json new file mode 100644 index 0000000000..ae2e4ace9e --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/dist/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.0.13" + } + ] +} diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts new file mode 100644 index 0000000000..16e61e5165 --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/outlook.d.ts @@ -0,0 +1,14590 @@ +import {Office as CommonAPI} from "../../api-extractor-inputs-office/office" +//////////////////////////////////////////////////////////////// +////////////////////// Begin Exchange APIs ///////////////////// +//////////////////////////////////////////////////////////////// + +export declare namespace Office { + export namespace MailboxEnums { + /** + * Specifies the type of custom action in a notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum ActionType { + /** + * The `showTaskPane` action. + */ + ShowTaskPane = "showTaskPane" + } + /** + * Specifies the {@link Office.Sensitivity | sensitivity level} of an appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum AppointmentSensitivityType { + /** + * The item needs no special treatment. + */ + Normal = "normal", + /** + * Treat the item as personal. + * + * **Important**: The Personal sensitivity level is only supported in Outlook on Windows. + */ + Personal = "personal", + /** + * Treat the item as private. + */ + Private = "private", + /** + * Treat the item as confidential. + * + * **Important**: The Confidential sensitivity level is only supported in Outlook on Windows. + */ + Confidential = "confidential" + } + /** + * Specifies the formatting that applies to an attachment's content. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum AttachmentContentFormat { + /** + * The content of the attachment is returned as a Base64-encoded string. + */ + Base64 = "base64", + /** + * The content of the attachment is returned as a string representing a URL. + */ + Url = "url", + /** + * The content of the attachment is returned as a string representing an .eml formatted file. + */ + Eml = "eml", + /** + * The content of the attachment is returned as a string representing an .icalendar formatted file. + */ + ICalendar = "iCalendar" + } + /** + * Specifies whether an attachment was added to or removed from an item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum AttachmentStatus { + /** + * An attachment was added to the item. + */ + Added = "added", + /** + * An attachment was removed from the item. + */ + Removed = "removed" + } + /** + * Specifies the attachment's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum AttachmentType { + /** + * The attachment is a file. + */ + File = "file", + /** + * The attachment is an Exchange item. + */ + Item = "item", + /** + * The attachment is stored in a cloud location, such as OneDrive. + * + * **Important**: In Read mode, the `id` property of the attachment's {@link Office.AttachmentDetails | details} object + * contains a URL to the file. + * From requirement set 1.8, the `url` property included in the attachment's + * {@link https://learn.microsoft.com/javascript/api/outlook/office.attachmentdetailscompose?view=outlook-js-1.8 | details} object + * contains a URL to the file in Compose mode. + */ + Cloud = "cloud" + } + /** + * Specifies the category color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: The actual color depends on how the Outlook client renders it. + * In this case, the colors noted on each preset apply to Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), + * and on Mac (starting in Version 16.78). + * + * Earlier versions of Outlook on Mac had a bug that displayed incorrect preset colors. + * This has now been fixed starting in Version 16.78. If you've recently updated your + * Outlook client, you need to adjust the category colors in your add-in to match the + * updated preset values. + */ + enum CategoryColor { + /** + * Default color or no color mapped. + */ + None, + /** + * Red + */ + Preset0, + /** + * Orange + */ + Preset1, + /** + * Brown + */ + Preset2, + /** + * Yellow + */ + Preset3, + /** + * Green + */ + Preset4, + /** + * Teal + */ + Preset5, + /** + * Olive + */ + Preset6, + /** + * Blue + */ + Preset7, + /** + * Purple + */ + Preset8, + /** + * Cranberry + */ + Preset9, + /** + * Steel + */ + Preset10, + /** + * DarkSteel + */ + Preset11, + /** + * Gray + */ + Preset12, + /** + * DarkGray + */ + Preset13, + /** + * Black + */ + Preset14, + /** + * DarkRed + */ + Preset15, + /** + * DarkOrange + */ + Preset16, + /** + * DarkBrown + */ + Preset17, + /** + * DarkYellow + */ + Preset18, + /** + * DarkGreen + */ + Preset19, + /** + * DarkTeal + */ + Preset20, + /** + * DarkOlive + */ + Preset21, + /** + * DarkBlue + */ + Preset22, + /** + * DarkPurple + */ + Preset23, + /** + * DarkCranberry + */ + Preset24 + } + /** + * Specifies a message's compose type. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum ComposeType { + /** + * Reply. + */ + Reply = "reply", + /** + * New mail. + */ + NewMail = "newMail", + /** + * Forward. + */ + Forward = "forward" + } + /** + * Specifies the day of week or type of day. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum Days { + /** + * Monday + */ + Mon = "mon", + /** + * Tuesday + */ + Tue = "tue", + /** + * Wednesday + */ + Wed = "wed", + /** + * Thursday + */ + Thu = "thu", + /** + * Friday + */ + Fri = "fri", + /** + * Saturday + */ + Sat = "sat", + /** + * Sunday + */ + Sun = "sun", + /** + * Week day (excludes weekend days): 'Mon', 'Tue', 'Wed', 'Thu', and 'Fri'. + */ + Weekday = "weekday", + /** + * Weekend day: 'Sat' and 'Sun'. + */ + WeekendDay = "weekendDay", + /** + * Day of week. + */ + Day = "day" + } + /** + * This bitmask represents a delegate's permissions on a shared folder. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum DelegatePermissions { + /** + * Delegate has permission to read items. + */ + Read = 1, + /** + * Delegate has permission to create and write items. + */ + Write = 2, + /** + * Delegate has permission to delete only the items they created. + */ + DeleteOwn = 4, + /** + * Delegate has permission to delete any items. + */ + DeleteAll = 8, + /** + * Delegate has permission to edit only they items they created. + */ + EditOwn = 16, + /** + * Delegate has permission to edit any items. + */ + EditAll = 32 + } + /** + * Specifies an entity's type. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum EntityType { + /** + * Specifies that the entity is a meeting suggestion. + */ + MeetingSuggestion = "meetingSuggestion", + /** + * Specifies that the entity is a task suggestion. + */ + TaskSuggestion = "taskSuggestion", + /** + * Specifies that the entity is a postal address. + */ + Address = "address", + /** + * Specifies that the entity is an SMTP email address. + */ + EmailAddress = "emailAddress", + /** + * Specifies that the entity is an Internet URL. + */ + Url = "url", + /** + * Specifies that the entity is a US phone number. + */ + PhoneNumber = "phoneNumber", + /** + * Specifies that the entity is a contact. + */ + Contact = "contact" + } + /** + * Action types supported by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarActionType { + /** + * Dismiss action was selected. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Dismiss = 1 + } + /** + * Type of notification allowed by {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType.InfobarClicked}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + enum InfobarType { + /** + * Notification displays an informational message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Informational = 0, + /** + * Notification displays a progress indicator. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + ProgressIndicator = 1, + /** + * Notification displays an error message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Error = 2, + /** + * Notification displays an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + Insight = 3 + } + /** + * Specifies the notification message type for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum ItemNotificationMessageType { + /** + * The notification message is a progress indicator. + */ + ProgressIndicator = "progressIndicator", + /** + * The notification message is an informational message. + */ + InformationalMessage = "informationalMessage", + /** + * The notification message is an error message. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + ErrorMessage = "errorMessage", + /** + * The notification message is an informational message with actions. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + InsightMessage = "insightMessage" + } + /** + * Specifies an item's type. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum ItemType { + /** + * An email, meeting request, meeting response, or meeting cancellation. + */ + Message = "message", + /** + * An appointment item. + */ + Appointment = "appointment" + } + /** + * Specifies an appointment location's type. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum LocationType { + /** + * A custom location. Custom locations don't have an SMTP address. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.enhancedlocation#outlook-office-enhancedlocation-getasync-member(1) | EnhancedLocation.getAsync} method. + */ + Custom = "custom", + /** + * A conference room or similar resource that has an SMTP address. + */ + Room = "room" + } + /** + * Specifies the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum Month { + /** + * January + */ + Jan = "jan", + /** + * February + */ + Feb = "feb", + /** + * March + */ + Mar = "mar", + /** + * April + */ + Apr = "apr", + /** + * May + */ + May = "may", + /** + * June + */ + Jun = "jun", + /** + * July + */ + Jul = "jul", + /** + * August + */ + Aug = "aug", + /** + * September + */ + Sep = "sep", + /** + * October + */ + Oct = "oct", + /** + * November + */ + Nov = "nov", + /** + * December + */ + Dec = "dec" + } + /** + * Specifies the folder to which a reported spam or phishing message is moved once it's processed by a spam-reporting add-in. + * + * To learn more about the integrated spam-reporting feature, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | Implement an integrated spam-reporting add-in}. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: This enum can only be used to assign values to the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions#outlook-office-spamreportingeventcompletedoptions-moveitemto-member | moveItemTo} + * property of the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | event.completed} + * method. If you're on an Outlook on Windows version that only supports the `postProcessingAction` property, + * you must assign it different string values. For a list of supported string values, see + * {@link https://learn.microsoft.com/javascript/api/outlook/office.spamreportingeventcompletedoptions#outlook-office-spamreportingeventcompletedoptions-postprocessingaction-member | + * Office.SpamReportingEventCompletedOptions.postProcessingAction}. + */ + enum MoveSpamItemTo { + /** + * Specifies that a reported message is moved to a custom folder in the mailbox. + */ + CustomFolder = "customFolder", + /** + * Specifies that a reported message is moved to the **Deleted Items** folder of the mailbox. + */ + DeletedItemsFolder = "deletedItemsFolder", + /** + * Specifies that a reported message is moved to the **Junk Email** folder of the mailbox. + */ + JunkFolder = "junkFolder", + /** + * Specifies that a reported message remains in its current folder in the mailbox. + */ + NoMove = "noMove" + } + /** + * Specifies the location from which an add-in wants to access data. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn more about APIs supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + enum OpenLocation { + /** + * A location associated with an account within an add-in. + */ + AccountDocument, + /** + * The device's camera. + */ + Camera, + /** + * Local storage on a device. + */ + Local, + /** + * OneDrive for Business. + * + * **Important**: For OneDrive Personal, use OTHER. + */ + OnedriveForBusiness, + /** + * Other cloud storage providers, including OneDrive Personal. + */ + Other, + /** + * The device's photo library. + */ + PhotoLibrary, + /** + * SharePoint. Includes both SharePoint Online and SharePoint on-premises (if accessed with a Microsoft Entra ID account). + */ + SharePoint + } + /** + * Represents the current view of Outlook on the web. + */ + enum OWAView { + /** + * Narrow one-column view. Displayed when the screen width is less than 436 pixels. + * For example, Outlook on the web uses this view on the entire screen of older smartphones. + */ + OneColumnNarrow = "OneColumnNarrow", + /** + * One-column view. Displayed when the screen width is greater than or equal to 436 pixels, + * but less than 536 pixels. For example, Outlook on the web uses this view on the entire screen of newer smartphones. + */ + OneColumn = "OneColumn", + /** + * Two-column view. Displayed when the screen width is greater than or equal to 536 pixels, + * but less than 780 pixels. For example, Outlook on the web uses this view on most tablets. + */ + TwoColumns = "TwoColumns", + /** + * Three-column view. Displayed when the screen width is greater than or equal to 780 pixels. + * For example, Outlook on the web uses this view in a full screen window on a desktop computer. + */ + ThreeColumns = "ThreeColumns" + } + /** + * Specifies the type of recipient of a message or appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + */ + enum RecipientType { + /** + * Specifies the recipient is a distribution list containing a list of email addresses. + */ + DistributionList = "distributionList", + /** + * Specifies the recipient is an SMTP email address on the Exchange server. + */ + User = "user", + /** + * Specifies the recipient is an SMTP email address that isn't on the Exchange server. It also refers to a recipient added from a personal Outlook address book. + * + * **Important**: In Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic + * (starting with Version 2210, Build 15813.20002)), and on Mac, Global Address Book (GAL) recipients saved to a personal address book return the `ExternalUser` value, + * even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly added or resolved against the GAL. + */ + ExternalUser = "externalUser", + /** + * Specifies the recipient isn't one of the other recipient types. It also refers to a recipient that isn't resolved against the Exchange address book, + * and is therefore treated as an external SMTP address. + * + * **Important**: In Outlook on Android and on iOS, Global Address Book (GAL) recipients saved to a personal address book return + * the `Other` value, even if their SMTP email address appears on the Exchange server. Recipients return a `User` value only if they're directly + * added or resolved against the GAL. + */ + Other = "other" + } + /** + * Specifies the time zone applied to the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum RecurrenceTimeZone { + /** + * Afghanistan Standard Time + */ + AfghanistanStandardTime = "Afghanistan Standard Time", + /** + * Alaskan Standard Time + */ + AlaskanStandardTime = "Alaskan Standard Time", + /** + * Aleutian Standard Time + */ + AleutianStandardTime = "Aleutian Standard Time", + /** + * Altai Standard Time + */ + AltaiStandardTime = "Altai Standard Time", + /** + * Arab Standard Time + */ + ArabStandardTime = "Arab Standard Time", + /** + * Arabian Standard Time + */ + ArabianStandardTime = "Arabian Standard Time", + /** + * Arabic Standard Time + */ + ArabicStandardTime = "Arabic Standard Time", + /** + * Argentina Standard Time + */ + ArgentinaStandardTime = "Argentina Standard Time", + /** + * Astrakhan Standard Time + */ + AstrakhanStandardTime = "Astrakhan Standard Time", + /** + * Atlantic Standard Time + */ + AtlanticStandardTime = "Atlantic Standard Time", + /** + * Australia Central Standard Time + */ + AUSCentralStandardTime = "AUS Central Standard Time", + /** + * Australia Central West Standard Time + */ + AusCentralW_StandardTime = "Aus Central W. Standard Time", + /** + * AUS Eastern Standard Time + */ + AUSEasternStandardTime = "AUS Eastern Standard Time", + /** + * Azerbaijan Standard Time + */ + AzerbaijanStandardTime = "Azerbaijan Standard Time", + /** + * Azores Standard Time + */ + AzoresStandardTime = "Azores Standard Time", + /** + * Bahia Standard Time + */ + BahiaStandardTime = "Bahia Standard Time", + /** + * Bangladesh Standard Time + */ + BangladeshStandardTime = "Bangladesh Standard Time", + /** + * Belarus Standard Time + */ + BelarusStandardTime = "Belarus Standard Time", + /** + * Bougainville Standard Time + */ + BougainvilleStandardTime = "Bougainville Standard Time", + /** + * Canada Central Standard Time + */ + CanadaCentralStandardTime = "Canada Central Standard Time", + /** + * Cape Verde Standard Time + */ + CapeVerdeStandardTime = "Cape Verde Standard Time", + /** + * Caucasus Standard Time + */ + CaucasusStandardTime = "Caucasus Standard Time", + /** + * Central Australia Standard Time + */ + CenAustraliaStandardTime = "Cen. Australia Standard Time", + /** + * Central America Standard Time + */ + CentralAmericaStandardTime = "Central America Standard Time", + /** + * Central Asia Standard Time + */ + CentralAsiaStandardTime = "Central Asia Standard Time", + /** + * Central Brazilian Standard Time + */ + CentralBrazilianStandardTime = "Central Brazilian Standard Time", + /** + * Central Europe Standard Time + */ + CentralEuropeStandardTime = "Central Europe Standard Time", + /** + * Central European Standard Time + */ + CentralEuropeanStandardTime = "Central European Standard Time", + /** + * Central Pacific Standard Time + */ + CentralPacificStandardTime = "Central Pacific Standard Time", + /** + * Central Standard Time + */ + CentralStandardTime = "Central Standard Time", + /** + * Central Standard Time (Mexico) + */ + CentralStandardTime_Mexico = "Central Standard Time (Mexico)", + /** + * Chatham Islands Standard Time + */ + ChathamIslandsStandardTime = "Chatham Islands Standard Time", + /** + * China Standard Time + */ + ChinaStandardTime = "China Standard Time", + /** + * Cuba Standard Time + */ + CubaStandardTime = "Cuba Standard Time", + /** + * Dateline Standard Time + */ + DatelineStandardTime = "Dateline Standard Time", + /** + * East Africa Standard Time + */ + E_AfricaStandardTime = "E. Africa Standard Time", + /** + * East Australia Standard Time + */ + E_AustraliaStandardTime = "E. Australia Standard Time", + /** + * East Europe Standard Time + */ + E_EuropeStandardTime = "E. Europe Standard Time", + /** + * East South America Standard Time + */ + E_SouthAmericaStandardTime = "E. South America Standard Time", + /** + * Easter Island Standard Time + */ + EasterIslandStandardTime = "Easter Island Standard Time", + /** + * Eastern Standard Time + */ + EasternStandardTime = "Eastern Standard Time", + /** + * Eastern Standard Time (Mexico) + */ + EasternStandardTime_Mexico = "Eastern Standard Time (Mexico)", + /** + * Egypt Standard Time + */ + EgyptStandardTime = "Egypt Standard Time", + /** + * Ekaterinburg Standard Time + */ + EkaterinburgStandardTime = "Ekaterinburg Standard Time", + /** + * Fiji Standard Time + */ + FijiStandardTime = "Fiji Standard Time", + /** + * FLE Standard Time + */ + FLEStandardTime = "FLE Standard Time", + /** + * Georgian Standard Time + */ + GeorgianStandardTime = "Georgian Standard Time", + /** + * GMT Standard Time + */ + GMTStandardTime = "GMT Standard Time", + /** + * Greenland Standard Time + */ + GreenlandStandardTime = "Greenland Standard Time", + /** + * Greenwich Standard Time + */ + GreenwichStandardTime = "Greenwich Standard Time", + /** + * GTB Standard Time + */ + GTBStandardTime = "GTB Standard Time", + /** + * Haiti Standard Time + */ + HaitiStandardTime = "Haiti Standard Time", + /** + * Hawaiian Standard Time + */ + HawaiianStandardTime = "Hawaiian Standard Time", + /** + * India Standard Time + */ + IndiaStandardTime = "India Standard Time", + /** + * Iran Standard Time + */ + IranStandardTime = "Iran Standard Time", + /** + * Israel Standard Time + */ + IsraelStandardTime = "Israel Standard Time", + /** + * Jordan Standard Time + */ + JordanStandardTime = "Jordan Standard Time", + /** + * Kaliningrad Standard Time + */ + KaliningradStandardTime = "Kaliningrad Standard Time", + /** + * Kamchatka Standard Time + */ + KamchatkaStandardTime = "Kamchatka Standard Time", + /** + * Korea Standard Time + */ + KoreaStandardTime = "Korea Standard Time", + /** + * Libya Standard Time + */ + LibyaStandardTime = "Libya Standard Time", + /** + * Line Islands Standard Time + */ + LineIslandsStandardTime = "Line Islands Standard Time", + /** + * Lord Howe Standard Time + */ + LordHoweStandardTime = "Lord Howe Standard Time", + /** + * Magadan Standard Time + */ + MagadanStandardTime = "Magadan Standard Time", + /** + * Magallanes Standard Time + */ + MagallanesStandardTime = "Magallanes Standard Time", + /** + * Marquesas Standard Time + */ + MarquesasStandardTime = "Marquesas Standard Time", + /** + * Mauritius Standard Time + */ + MauritiusStandardTime = "Mauritius Standard Time", + /** + * Mid-Atlantic Standard Time + */ + MidAtlanticStandardTime = "Mid-Atlantic Standard Time", + /** + * Middle East Standard Time + */ + MiddleEastStandardTime = "Middle East Standard Time", + /** + * Montevideo Standard Time + */ + MontevideoStandardTime = "Montevideo Standard Time", + /** + * Morocco Standard Time + */ + MoroccoStandardTime = "Morocco Standard Time", + /** + * Mountain Standard Time + */ + MountainStandardTime = "Mountain Standard Time", + /** + * Mountain Standard Time (Mexico) + */ + MountainStandardTime_Mexico = "Mountain Standard Time (Mexico)", + /** + * Myanmar Standard Time + */ + MyanmarStandardTime = "Myanmar Standard Time", + /** + * North Central Asia Standard Time + */ + N_CentralAsiaStandardTime = "N. Central Asia Standard Time", + /** + * Namibia Standard Time + */ + NamibiaStandardTime = "Namibia Standard Time", + /** + * Nepal Standard Time + */ + NepalStandardTime = "Nepal Standard Time", + /** + * New Zealand Standard Time + */ + NewZealandStandardTime = "New Zealand Standard Time", + /** + * Newfoundland Standard Time + */ + NewfoundlandStandardTime = "Newfoundland Standard Time", + /** + * Norfolk Standard Time + */ + NorfolkStandardTime = "Norfolk Standard Time", + /** + * North Asia East Standard Time + */ + NorthAsiaEastStandardTime = "North Asia East Standard Time", + /** + * North Asia Standard Time + */ + NorthAsiaStandardTime = "North Asia Standard Time", + /** + * North Korea Standard Time + */ + NorthKoreaStandardTime = "North Korea Standard Time", + /** + * Omsk Standard Time + */ + OmskStandardTime = "Omsk Standard Time", + /** + * Pacific SA Standard Time + */ + PacificSAStandardTime = "Pacific SA Standard Time", + /** + * Pacific Standard Time + */ + PacificStandardTime = "Pacific Standard Time", + /** + * Pacific Standard Time (Mexico) + */ + PacificStandardTimeMexico = "Pacific Standard Time (Mexico)", + /** + * Pakistan Standard Time + */ + PakistanStandardTime = "Pakistan Standard Time", + /** + * Paraguay Standard Time + */ + ParaguayStandardTime = "Paraguay Standard Time", + /** + * Romance Standard Time + */ + RomanceStandardTime = "Romance Standard Time", + /** + * Russia Time Zone 10 + */ + RussiaTimeZone10 = "Russia Time Zone 10", + /** + * Russia Time Zone 11 + */ + RussiaTimeZone11 = "Russia Time Zone 11", + /** + * Russia Time Zone 3 + */ + RussiaTimeZone3 = "Russia Time Zone 3", + /** + * Russian Standard Time + */ + RussianStandardTime = "Russian Standard Time", + /** + * SA Eastern Standard Time + */ + SAEasternStandardTime = "SA Eastern Standard Time", + /** + * SA Pacific Standard Time + */ + SAPacificStandardTime = "SA Pacific Standard Time", + /** + * SA Western Standard Time + */ + SAWesternStandardTime = "SA Western Standard Time", + /** + * Saint Pierre Standard Time + */ + SaintPierreStandardTime = "Saint Pierre Standard Time", + /** + * Sakhalin Standard Time + */ + SakhalinStandardTime = "Sakhalin Standard Time", + /** + * Samoa Standard Time + */ + SamoaStandardTime = "Samoa Standard Time", + /** + * Saratov Standard Time + */ + SaratovStandardTime = "Saratov Standard Time", + /** + * Southeast Asia Standard Time + */ + SEAsiaStandardTime = "SE Asia Standard Time", + /** + * Singapore Standard Time + */ + SingaporeStandardTime = "Singapore Standard Time", + /** + * South Africa Standard Time + */ + SouthAfricaStandardTime = "South Africa Standard Time", + /** + * Sri Lanka Standard Time + */ + SriLankaStandardTime = "Sri Lanka Standard Time", + /** + * Sudan Standard Time + */ + SudanStandardTime = "Sudan Standard Time", + /** + * Syria Standard Time + */ + SyriaStandardTime = "Syria Standard Time", + /** + * Taipei Standard Time + */ + TaipeiStandardTime = "Taipei Standard Time", + /** + * Tasmania Standard Time + */ + TasmaniaStandardTime = "Tasmania Standard Time", + /** + * Tocantins Standard Time + */ + TocantinsStandardTime = "Tocantins Standard Time", + /** + * Tokyo Standard Time + */ + TokyoStandardTime = "Tokyo Standard Time", + /** + * Tomsk Standard Time + */ + TomskStandardTime = "Tomsk Standard Time", + /** + * Tonga Standard Time + */ + TongaStandardTime = "Tonga Standard Time", + /** + * Transbaikal Standard Time + */ + TransbaikalStandardTime = "Transbaikal Standard Time", + /** + * Turkey Standard Time + */ + TurkeyStandardTime = "Turkey Standard Time", + /** + * Turks And Caicos Standard Time + */ + TurksAndCaicosStandardTime = "Turks And Caicos Standard Time", + /** + * Ulaanbaatar Standard Time + */ + UlaanbaatarStandardTime = "Ulaanbaatar Standard Time", + /** + * United States Eastern Standard Time + */ + USEasternStandardTime = "US Eastern Standard Time", + /** + * United States Mountain Standard Time + */ + USMountainStandardTime = "US Mountain Standard Time", + /** + * Coordinated Universal Time (UTC) + */ + UTC = "UTC", + /** + * Coordinated Universal Time (UTC) + 12 hours + */ + UTCPLUS12 = "UTC+12", + /** + * Coordinated Universal Time (UTC) + 13 hours + */ + UTCPLUS13 = "UTC+13", + /** + * Coordinated Universal Time (UTC) - 2 hours + */ + UTCMINUS02 = "UTC-02", + /** + * Coordinated Universal Time (UTC) - 8 hours + */ + UTCMINUS08 = "UTC-08", + /** + * Coordinated Universal Time (UTC) - 9 hours + */ + UTCMINUS09 = "UTC-09", + /** + * Coordinated Universal Time (UTC) - 11 hours + */ + UTCMINUS11 = "UTC-11", + /** + * Venezuela Standard Time + */ + VenezuelaStandardTime = "Venezuela Standard Time", + /** + * Vladivostok Standard Time + */ + VladivostokStandardTime = "Vladivostok Standard Time", + /** + * West Australia Standard Time + */ + W_AustraliaStandardTime = "W. Australia Standard Time", + /** + * West Central Africa Standard Time + */ + W_CentralAfricaStandardTime = "W. Central Africa Standard Time", + /** + * West Europe Standard Time + */ + W_EuropeStandardTime = "W. Europe Standard Time", + /** + * West Mongolia Standard Time + */ + W_MongoliaStandardTime = "W. Mongolia Standard Time", + /** + * West Asia Standard Time + */ + WestAsiaStandardTime = "West Asia Standard Time", + /** + * West Bank Standard Time + */ + WestBankStandardTime = "West Bank Standard Time", + /** + * West Pacific Standard Time + */ + WestPacificStandardTime = "West Pacific Standard Time", + /** + * Yakutsk Standard Time + */ + YakutskStandardTime = "Yakutsk Standard Time" + } + /** + * Specifies the type of recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum RecurrenceType { + /** + * Daily. + */ + Daily = "daily", + /** + * Weekday. + */ + Weekday = "weekday", + /** + * Weekly. + */ + Weekly = "weekly", + /** + * Monthly. + */ + Monthly = "monthly", + /** + * Yearly. + */ + Yearly = "yearly" + } + /** + * Specifies the type of response to a meeting invitation. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum ResponseType { + /** + * There has been no response from the attendee. + */ + None = "none", + /** + * The attendee is the meeting organizer. + */ + Organizer = "organizer", + /** + * The meeting request was tentatively accepted by the attendee. + */ + Tentative = "tentative", + /** + * The meeting request was accepted by the attendee. + */ + Accepted = "accepted", + /** + * The meeting request was declined by the attendee. + */ + Declined = "declined" + } + /** + * Specifies the version of the REST API that corresponds to a REST-formatted item ID. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service + * until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also + * applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your + * add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see + * {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}. + */ + enum RestVersion { + /** + * Version 1.0. + */ + v1_0 = "v1.0", + /** + * Version 2.0. + */ + v2_0 = "v2.0", + /** + * Beta. + */ + Beta = "beta" + } + /** + * Specifies the location in which an add-in wants to save data. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This enum is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn more about APIs supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + enum SaveLocation { + /** + * A location associated with an account within an add-in. + */ + AccountDocument, + /** + * Box. + */ + Box, + /** + * Dropbox. + */ + Dropbox, + /** + * Google Drive. + */ + GoogleDrive, + /** + * Local storage on a device. + */ + Local, + /** + * OneDrive for Business. + * + * **Important**: For OneDrive Personal, use OTHER. + */ + OnedriveForBusiness, + /** + * Other cloud storage providers, including OneDrive Personal. + */ + Other, + /** + * The device's photo library. + */ + PhotoLibrary, + /** + * SharePoint. Includes both SharePoint Online and SharePoint on-premises (if accessed with a Microsoft Entra ID account). + */ + SharePoint + } + /** + * Specifies the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#available-send-mode-options | send mode option} + * that overrides the option set in the manifest at runtime. + * + * For information on how to implement a Smart Alerts add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts}. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum SendModeOverride { + /** + * Provides the **Send Anyway** option in a Smart Alerts dialog when the mail item doesn't meet the conditions of the event-based add-in. + * To learn more, see the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#prompt-user | **prompt user** send mode option}. + */ + PromptUser = "promptUser" + } + /** + * Specifies the source of the selected data in an item (see `Office.mailbox.item.getSelectedDataAsync` for details). + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + enum SourceProperty { + /** + * The source of the data is from the body of the item. + */ + Body = "body", + /** + * The source of the data is from the subject of the item. + */ + Subject = "subject" + } + /** + * Specifies the week of the month. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + enum WeekNumber { + /** + * First week of the month. + */ + First = "first", + /** + * Second week of the month. + */ + Second = "second", + /** + * Third week of the month. + */ + Third = "third", + /** + * Fourth week of the month. + */ + Fourth = "fourth", + /** + * Last week of the month. + */ + Last = "last" + } + } + /** + * Provides an option for the data format. + */ + export interface CoercionTypeOptions { + /** + * The desired data format. + */ + coercionType?: CommonAPI.CoercionType | string; + } + /** + * The subclass of {@link Office.Item | Item} dealing with appointments. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + */ + export interface Appointment extends Item { + } + /** + * The appointment organizer mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Appointment | Appointment} + */ + export interface AppointmentCompose extends Appointment, ItemCompose { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + categories: Categories; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The `end` property is a {@link Office.Time | Time} object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * **Important**: In the Windows client, you can't use this property to update the end of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + end: Time; + /** + * Gets or sets the locations of the appointment. The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} + * object that provides methods to get, remove, or add locations on an item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + enhancedLocation: EnhancedLocation; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the `item` object instance is a message or an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets or sets the location of an appointment. The `location` property returns a {@link Office.Location | Location} object that provides methods that are + * used to get and set the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + location: Location; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + optionalAttendees: Recipients; + /** + * Gets the organizer for the specified meeting. + * + * The `organizer` property returns an {@link Office.Organizer | Organizer} object that provides a method to get the organizer value. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + organizer: Organizer; + /** + * Gets or sets the recurrence pattern of an appointment. + * + * The `recurrence` property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * + * **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. + * + * **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single + * appointment and NOT a part of a series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + recurrence: Recurrence; + /** + * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + requiredAttendees: Recipients; + /** + * Gets or sets the {@link Office.Sensitivity | sensitivity level} of an appointment. + * For information about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, and Outlook on Mac + * only support Normal and Private sensitivity levels. + */ + sensitivity: Sensitivity; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of an appointment. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac, + * the `seriesId` property returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in Outlook on Android and on iOS, `seriesId` returns the REST ID of the parent item. + * + * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + sessionData: SessionData; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The `start` property is a {@link Office.Time | Time} object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * **Important**: In the Windows client, you can't use this property to update the start of a recurrence. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + start: Time; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The `subject` property gets or sets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a `Subject` object that provides methods to get and set the subject. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + */ + subject: Subject; + + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * @remarks + * [Api set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new Outlook on Windows] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, use the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't return a `Cache-Control` header that + * specifies `no-cache`, `no-store`, or similar options in the HTTP response. However, when you're developing the add-in and making changes to files, + * caching can prevent you from seeing your changes. We recommend using `Cache-Control` headers during development. + * + * - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `isInline`: If true, indicates that the attachment will be shown inline as an image in the message body and won't be displayed in the attachment list. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: CommonAPI.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * @remarks + * [Api set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new Outlook on Windows] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, use the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't return a `Cache-Control` header that + * specifies `no-cache`, `no-store`, or similar options in the HTTP response. However, when you're developing the add-in and making changes to files, + * caching can prevent you from seeing your changes. We recommend using `Cache-Control` headers during development. + * + * - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. + * This method returns the attachment identifier in the `asyncResult.value` object. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `isInline`: If true, indicates that the attachment will be shown inline as an image in the message body and won't be displayed in the attachment list. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: CommonAPI.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. + * This method returns the attachment identifier in the `asyncResult.value` object. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Note**: If you're using a data URL API (e.g., `readAsDataURL`), you need to strip out the data URL prefix then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * **Note**: If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the `options` parameter to pass state information to the callback function, if needed. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * If your Office Add-in is running in Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `addItemAttachmentAsync` method can attach items to items other than the item that you're editing. However, this isn't supported and isn't recommended. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If adding the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. + * You can use the `options` parameter to pass state information to the callback function, if needed. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * If your Office Add-in is running in Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `addItemAttachmentAsync` method can attach items to items other than the item that you're editing. However, this isn't supported and isn't recommended. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. + * On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If adding the attachment fails, the `asyncResult` object will contain + * an `Error` object that provides a description of the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior of the `close` method depends on the current state of the item being composed. + * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. + * + * In Outlook on Windows (classic) and on Mac, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save, discard, or cancel even if no changes have occurred + * since the item was last saved. + */ + close(): void; + /** + * Disables the Outlook client signature. + * + * In Outlook on Windows (classic) and on Mac, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, the API disables the signature + * option for new mails, replies, and forwards. If the signature is selected, this API call disables it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * In Outlook on Windows (classic) and on Mac, this API sets the signature under the "New Message" and "Replies/Forwards" sections + * for the sending account to "(none)", effectively disabling the signature. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, the API disables the signature + * option for new mails, replies, and forwards. If the signature is selected, this API call disables it. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the item ID isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the item ID isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. + * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. + * + * To access the selected data from the callback function, call `asyncResult.value.data`. + * To access the `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. + * If `HTML`, the method returns the selected text, whether it is plaintext or HTML. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getSelectedDataAsync(coercionType: CommonAPI.CoercionType | string, options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. + * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. + * + * To access the selected data from the callback function, call `asyncResult.value.data`. + * To access the `source` property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. + * If `HTML`, the method returns the selected text, whether it is plaintext or HTML. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getSelectedDataAsync(coercionType: CommonAPI.CoercionType | string, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic) and on Mac, returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac or disabled in Outlook on the web or new Outlook on Windows, + * returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic) and on Mac, returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac or disabled in Outlook on the web or new Outlook on Windows, + * returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get, set, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Removes an attachment from a message or appointment. + * + * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. + * To remove an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + * Use the {@link https://learn.microsoft.com/javascript/api/outlook/office.body | Office.Body} APIs to get and set the body of an item. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows (new and classic). + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * If removing the attachment fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. + * To remove an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + * Use the {@link https://learn.microsoft.com/javascript/api/outlook/office.body | Office.Body} APIs to get and set the body of an item. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows (new and classic). + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * If removing the attachment fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * @param eventType - The event that should revoke the handler. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal + * appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent. + * For existing appointments, an update is sent to added or removed attendees. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS appointment ID is returned in the `asyncResult.value` property. + */ + saveAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * Since appointments have no draft state, if `saveAsync` is called on an appointment in compose mode, the item is saved as a normal + * appointment on the user's calendar. For new appointments that haven't been saved before, no invitation is sent. + * For existing appointments, an update is sent to added or removed attendees. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on Mac, only Version 16.35 (20030802) and later supports saving a meeting. + * Otherwise, the `saveAsync` method fails when called from a meeting in compose mode. + * For a workaround, see {@link https://learn.microsoft.com/outlook/troubleshoot/calendars/cannot-save-meeting-as-draft-in-outlook-for-mac | Cannot save a meeting as a draft in Outlook for Mac by using Office JS API}. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS appointment ID is returned in the `asyncResult.value` property. + */ + saveAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: If text, the current style is applied in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If the data is HTML and the field supports HTML (the subject doesn't), the current style is applied in + * Outlook on the web and new Outlook on Windows. The default style is applied in Outlook on Windows (classic) and on Mac. + * If the field is a text field, an `InvalidDataFormat` error is returned. + * If `coercionType` is not set, the result depends on the field: + * if the field is HTML then HTML is used; if the field is text, then plain text is used. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setSelectedDataAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setSelectedDataAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The `AppointmentForm` object is used to access the currently selected appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface AppointmentForm { + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + body: Body | string; + /** + * Gets or sets the date and time that the appointment is to end. + * + * The `end` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the `convertToLocalClientTime` method to + * convert the `end` property value to the client's local date and time. + * + * *Read mode* + * + * The `end` property returns a `Date` object. + * + * *Compose mode* + * + * The `end` property returns a `Time` object. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + end: Time | Date; + /** + * Gets or sets the location of an appointment. + * + * *Read mode* + * + * The `location` property returns a string that contains the location of the appointment. + * + * *Compose mode* + * + * The `location` property returns a `Location` object that provides methods that are used to get and set the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + location: Location | string; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. Collection size limits: + * + * - Web browser, new Mac UI, Android: No limit + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * *Compose mode* + * + * The `optionalAttendees` property returns a `Recipients` object that provides methods to get or update the + * optional attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + optionalAttendees: Recipients[] | EmailAddressDetails[]; + /** + * Provides access to the resources of an event. Returns an array of strings containing the resources required for the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + resources: string[]; + /** + * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * *Read mode* + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. Collection size limits: + * + * - Web browser, new Mac UI, Android: No limit + * + * - Windows: 500 members + * + * - Classic Mac UI: 100 members + * + * *Compose mode* + * + * The `requiredAttendees` property returns a `Recipients` object that provides methods to get or update the + * required attendees for a meeting. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many + * recipients you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + requiredAttendees: Recipients[] | EmailAddressDetails[]; + /** + * Gets or sets the date and time that the appointment is to begin. + * + * The `start` property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the `convertToLocalClientTime` method + * to convert the value to the client's local date and time. + * + * *Read mode* + * + * The `start` property returns a `Date` object. + * + * *Compose mode* + * + * The `start` property returns a `Time` object. + * + * When you use the `Time.setAsync` method to set the start time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + start: Time | Date; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The `subject` property gets or sets the entire subject of the item, as sent by the email server. + * + * *Read mode* + * + * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. + * + * *Compose mode* + * + * The `subject` property returns a `Subject` object that provides methods to get and set the subject. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + subject: Subject | string; + } + /** + * The appointment attendee mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Appointment | Appointment} + */ + export interface AppointmentRead extends Appointment, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. For more information, see + * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + categories: Categories; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets the date and time that the appointment is to end. + * + * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + end: Date; + /** + * Gets the locations of an appointment. + * + * The `enhancedLocation` property returns an {@link Office.EnhancedLocation | EnhancedLocation} object that allows you to get the set of locations + * (each represented by a {@link Office.LocationDetails | LocationDetails} object) associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + enhancedLocation: EnhancedLocation; + /** + * Gets the Exchange Web Services item class of the selected appointment. + * + * Returns `IPM.Appointment` for non-recurring appointments and `IPM.Appointment.Occurrence` for recurring appointments. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: You can create custom classes that extend a default item class. For example, `IPM.Appointment.Contoso`. + */ + itemClass: string; + /** + * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - The `itemId` property isn't available in compose mode. + * If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier + * in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of an appointment. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + location: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by email programs. + * To get the subject of the item with the prefixes intact, use the `subject` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + notificationMessages: NotificationMessages; + /** + * Provides access to the optional attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `optionalAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each optional attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + optionalAttendees: EmailAddressDetails[]; + /** + * Gets the meeting organizer's email properties. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + organizer: EmailAddressDetails; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * + * The `recurrence` property returns a {@link Office.Recurrence | Recurrence} object for recurring appointments or meetings requests + * if an item is a series or an instance in a series. `null` is returned for single appointments and meeting requests of single appointments. + * + * **Note**: Meeting requests have an `itemClass` value of `IPM.Schedule.Meeting.Request`. + * + * **Note**: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single + * appointment and NOT a part of a series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + recurrence: Recurrence; + /** + * Provides access to the required attendees of an event. The type of object and level of access depend on the mode of the current item. + * + * The `requiredAttendees` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each required attendee to the meeting. The maximum number of attendees returned varies per Outlook client. + * + * - Windows: 500 attendees + * + * - Android, classic Mac UI, iOS: 100 attendees + * + * - New Mac UI, web browser: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: In Outlook on the web and on Windows (new and classic), the appointment organizer is included in the object returned by the `requiredAttendees` property. + */ + requiredAttendees: EmailAddressDetails[]; + /** + * Gets the date and time that the appointment is to begin. + * + * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + start: Date; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac, + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, on iOS and Android, the seriesId returns the REST ID of the parent item. + * + * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it + * should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that do not have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that are not meeting requests. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + seriesId: string; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets or sets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + subject: string; + /** + * Provides the sensitivity value of the appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, and Outlook on Mac + * only support Normal and Private sensitivity levels. + */ + sensitivity: MailboxEnums.AppointmentSensitivityType; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.AppointmentRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @returns + * If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns null. + * If no entities of the specified type are present in the item's body, the method returns an empty array. + * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the `entityType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param entityType - One of the `EntityType` enumeration values. + */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest file. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @returns + * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the + * add-in manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): Array; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an add-in only manifest file. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule. + * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an add-in only manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the add-in manifest file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getSelectedEntities(): Entities; + /** + * Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file. + * Highlighted matches apply to contextual add-ins. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file. + * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule. + * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that's specified by that rule. + * The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the + * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get, set, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param eventType - The event that should revoke the handler. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides the current dates and times of the appointment that raised the `Office.EventType.AppointmentTimeChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface AppointmentTimeChangedEventArgs { + /** + * Gets the appointment end date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + end: Date; + /** + * Gets the appointment start date and time. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + start: Date; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkAppointmentTimeChanged"; + } + /** + * Represents the content of an attachment on a message or appointment item. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface AttachmentContent { + /** + * The content of an attachment as a string. + */ + content: string; + /** + * The string format to use for an attachment's content. + * + * For file attachments, the formatting is a Base64-encoded string. + * + * For item attachments that represent messages and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .eml formatted file. + * + * For item attachments that represent calendar items and were attached by drag-and-drop or "Attach Item", + * the formatting is a string representing an .icalendar file. + * + * **Important**: If a message or calendar item was attached by drag-and-drop in Outlook on the web or + * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * then `getAttachmentContentAsync` throws an error. + * + * For cloud attachments, the formatting is a URL string. + */ + format: MailboxEnums.AttachmentContentFormat | string; + } + /** + * Represents an attachment on an item. Compose mode only. + * + * An array of `AttachmentDetailsCompose` objects is returned by the `getAttachmentsAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface AttachmentDetailsCompose { + /** + * Gets a value that indicates the attachment's type. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the index of the attachment. + */ + id: string; + /** + * Gets a value that indicates whether the attachment appears as an image in the body of the item instead of in the attachment list. + */ + isInline: boolean; + /** + * Gets the name of the attachment. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + /** + * Gets the url of the attachment if its type is `MailboxEnums.AttachmentType.Cloud`. + */ + url?: string; + } + /** + * Represents an attachment on an item from the server. Read mode only. + * + * An array of `AttachmentDetails` objects is returned as the `attachments` property of an appointment or message item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface AttachmentDetails { + /** + * Gets a value that indicates the attachment's type. + */ + attachmentType: MailboxEnums.AttachmentType | string; + /** + * Gets the MIME content type of the attachment. + * + * **Warning**: While the `contentType` value is a direct lookup of the attachment's extension, the internal mapping isn't actively maintained + * so this property has been deprecated. If you require specific types, grab the attachment's extension and process accordingly. For details, + * refer to the {@link https://devblogs.microsoft.com/microsoft365dev/outlook-javascript-api-deprecation-for-attachmentdetails-contenttype-property/ | related blog post }. + * + * @deprecated If you require specific content types, grab the attachment's extension and process accordingly. + */ + contentType: string; + /** + * Gets the Exchange attachment ID of the attachment. + * However, if the attachment type is `MailboxEnums.AttachmentType.Cloud`, then a URL for the file is returned. + */ + id: string; + /** + * Gets a value that indicates whether the attachment appears as an image in the body of the item instead of in the attachment list. + */ + isInline: boolean; + /** + * Gets the name of the attachment. + * + * **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item", + * `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows. + */ + name: string; + /** + * Gets the size of the attachment in bytes. + */ + size: number; + } + /** + * Provides information about the attachment on a mail item that raised the + * `Office.EventType.AttachmentsChanged` event. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface AttachmentsChangedEventArgs { + /** + * Gets the object that represents the attachment that was added or removed from + * a mail item. The object contains the `id`, `name`, `size`, and `attachmentType` properties + * of the attachment. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentDetails: object; + /** + * Specifies whether the attachment was added or removed from a mail item. For details, see + * {@link Office.MailboxEnums.AttachmentStatus | MailboxEnums.AttachmentStatus}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + attachmentStatus: MailboxEnums.AttachmentStatus | string; + /** + * Gets the type of event that was raised. For details, see + * {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkAttachmentsChanged"; + } + /** + * The body object provides methods for adding and updating the content of the message or appointment. + * It is returned in the body property of the selected item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Known issue with HTML table border colors** + * + * Outlook on Windows: If you're setting various cell borders to different colors in an HTML table in Compose mode, a cell's borders may not reflect + * the expected color. For the known behavior, visit {@link https://github.com/OfficeDev/office-js/issues/1818 | OfficeDev/office-js issue #1818}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface Body { + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - If the user is running add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send feature} + * using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * - To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `appendOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: The desired format for the data to be appended. The string in the `data` parameter will be converted to this format. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + appendOnSendAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Appends on send the specified content to the end of the item body, after any signature. + * + * To use `appendOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. See {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. To learn more + * about append-on-send and its configuration, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/append-on-send | Implement append-on-send in your Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - If the user is running add-ins that implement the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-on-send-addins | on-send feature} + * using `ItemSend` in the manifest, append-on-send runs before on-send functionality. + * + * - If your add-in implements the on-send feature and calls `appendOnSendAsync` in the `ItemSend` handler, + * the `appendOnSendAsync` call returns an error as this scenario isn't supported. + * + * - To clear data from a previous `appendOnSendAsync` call, you can call it again with the `data` parameter set to `null`. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `appendOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` but the message body is in plain text. + * + * @param data - The string to be added to the end of the body. The string is limited to 5,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + appendOnSendAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call. + * Otherwise, you may receive an unexpected value, such as an empty string. + * + * @param coercionType - The format for the returned body. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property. + */ + getAsync(coercionType: CommonAPI.CoercionType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns the current body in a specified format. + * + * This method returns the entire current body in the format specified by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call. + * Otherwise, you may receive an unexpected value, such as an empty string. + * + * @param coercionType - The format for the returned body. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property. + */ + getAsync(coercionType: CommonAPI.CoercionType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * The content type is returned as one of the `CoercionType` values in the `asyncResult.value` property. + */ + getTypeAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a value that indicates whether the content is in HTML or text format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * The content type is returned as one of the `CoercionType` values in the `asyncResult.value` property. + */ + getTypeAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on the web and on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), the cursor position remains the same in the preexisting content of the body. + * For example, if the cursor was positioned at the beginning of the body prior to the `prependAsync` call, it will appear between the prepended content and the preexisting + * content of the body after the call. In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the + * user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `prependAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + * + * @param data - The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + prependAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on the web and on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), the cursor position remains the same in the preexisting content of the body. + * For example, if the cursor was positioned at the beginning of the body prior to the `prependAsync` call, it will appear between the prepended content and the preexisting + * content of the body after the call. In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the + * user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to + * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method + * (introduced in Mailbox 1.3) won't necessarily contain the exact value that was passed in the previous `prependAsync` call. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `prependAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + * + * @param data - The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + prependAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `prependOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Any object that can be accessed in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter is converted to this format. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + prependOnSendAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Prepends HTML or plain text to the beginning of a message or appointment body when the mail item is sent. + * + * To use `prependOnSendAsync`, you must specify a supplementary permission in the manifest. Details vary with the type of manifest. For guidance, + * see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Understanding Outlook add-in permissions}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass its returned value to the `options.coercionType` parameter. + * + * **Important**: When implementing `prependOnSendAsync`, keep the following in mind. + * + * - In a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in}, + * the prepend-on-send feature runs first. + * + * - A new line is added after the prepended content. + * + * - If multiple active add-ins call `prependOnSendAsync`, the order of the inserted content depends on the order in which the add-in runs. + * The content of the last run add-in appears above previously prepended content. + * + * - If the add-in attempts to insert HTML into a plain text body, the content won't be prepended. Conversely, plain text will be inserted into an HTML body. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `prependOnSendAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter exceeds 5,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html`, but the item body is in plain text format. + * + * @param data - The string to be prepended to the beginning of the message or appointment body. The string is limited to 5,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + prependOnSendAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. + * In classic Outlook on Windows, the cursor appears at the beginning of the body of the mail item. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the cursor appears at the end of the body of the mail item. In Outlook on Mac, the cursor position isn't preserved. + * The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `setAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces the entire body with the specified text. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync`, then pass the returned value to the `options.coercionType` parameter. + * + * **Important**: + * + * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. + * In classic Outlook on Windows, the cursor appears at the beginning of the body of the mail item. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the cursor appears at the end of the body of the mail item. In Outlook on Mac, the cursor position isn't preserved. + * The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item. + * + * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily + * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it + * render efficiently with its rendering engine. + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - In Outlook on Windows (classic) and on Mac, the add-in user isn't able to revert this action with the **Undo** command. + * + * - In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `setAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces the selection in the body with the specified text. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Important*: + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `setSelectedDataAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setSelectedDataAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces the selection in the body with the specified text. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the body of the item, or, if text is selected in + * the editor, it replaces the selected text. If the cursor was never in the body of the item, or if the body of the item lost focus in the + * UI, the string will be inserted at the top of the body content. After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Recommended**: Call `getTypeAsync` then pass the returned value to the `options.coercionType` parameter. + * + * **Important*: + * + * - When including links in HTML markup, you can disable online link preview by setting the `id` attribute on the anchor (\) to "LPNoLP" + * (see the **Examples** section for a sample). + * + * - SVG files aren't supported. Use JPG or PNG files instead. + * + * - The `setSelectedDataAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 1,000,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setSelectedDataAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the body, replaces that signature. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using LaunchEvent in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * - SVG files aren't supported in mail signatures. Use JPG or PNG files instead. + * + * - The `setSignatureAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: The format the signature should be set to. If Text, the method sets the signature to plain text, + * removing any HTML tags present. If Html, the method sets the signature to HTML. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + setSignatureAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a signature to the item body if it doesn't have an existing signature. If there's already a signature in the body, replaces that signature. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * `setSignatureAsync` only works on messages. + * + * - This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The behavior of `setSignatureAsync` differs if you call it in the event handler of an add-in that implements the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation feature using LaunchEvent in the manifest}. + * When the user composes a new item (including reply or forward), the signature is set but doesn't modify the form. This means + * if the user closes the form without making other edits, they won't be prompted to save changes. + * + * - SVG files aren't supported in mail signatures. Use JPG or PNG files instead. + * + * - The `setSignatureAsync` method doesn't support inline CSS. Use internal or external CSS instead. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The `data` parameter is longer than 30,000 characters. + * + * - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text. + * + * @param data - The string that represents the signature to be set in the body of the mail. This string is limited to 30,000 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + setSignatureAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents the categories on an item. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines {@link Office.MasterCategories | categories in a master list} on their mailbox. + * They can then apply one or more categories to an item. + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface Categories { + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds categories to an item. Each category must be in the categories master list on that mailbox and so must have a unique name + * but multiple categories can use the same color. + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message or appointment item in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `InvalidCategory`: Invalid categories were provided. + * + * @param categories - The categories to be added to the item. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: string[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an item's categories. + * + * **Important**: + * + * - If there are no categories on the item, `null` or an empty array will be returned depending on the Outlook version + * so make sure to handle both cases. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If getting categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes categories from an item. + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories applied to a message in Compose mode. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param categories - The categories to be removed from the item. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a category's details like name and associated color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface CategoryDetails { + /** + * The name of the category. Maximum length is 255 characters. + */ + displayName: string; + /** + * The color of the category. + */ + color: MailboxEnums.CategoryColor | string; + } + /** + * Represents the details about a contact (similar to what's on a physical contact or business card) extracted from the item's body. Read mode only. + * + * The list of contacts extracted from the body of an email message or appointment is returned in the `contacts` property of the + * {@link Office.Entities | Entities} object returned by the `getEntities` or `getEntitiesByType` method of the current item. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * **Important**: Entity-based contextual Outlook add-ins will be retired in Q2 of 2024. The work to retire this feature will start in May and continue + * until the end of June. After June, contextual add-ins will no longer be able to detect entities in mail items to perform tasks on them. + * The following APIs will also be retired. + * + * - `Office.context.mailbox.item.getEntities` + * - `Office.context.mailbox.item.getEntitiesByType` + * - `Office.context.mailbox.item.getFilteredEntitiesByName` + * - `Office.context.mailbox.item.getSelectedEntities` + * + * To help minimize potential disruptions, the following will still be supported after entity-based contextual add-ins are retired. + * + * - An alternative implementation of the **Join Meeting** button, which is activated by online meeting add-ins, is being developed. Once support for + * entity-based contextual add-ins ends, online meeting add-ins will automatically transition to the alternative implementation to activate the + * **Join Meeting** button. + * + * - Regular expression rules will continue to be supported after entity-based contextual add-ins are retired. We recommend updating your contextual add-in + * to use regular expression rules as an alternative solution. For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * For more information, see + * {@link https://devblogs.microsoft.com/microsoft365dev/retirement-of-entity-based-contextual-outlook-add-ins | Retirement of entity-based contextual Outlook add-ins}. + */ + export interface Contact { + /** + * An array of strings containing the mailing and street addresses associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + addresses: string[]; + /** + * A string containing the name of the business associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + businessName: string; + /** + * An array of strings containing the SMTP email addresses associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + emailAddresses: string[]; + /** + * A string containing the name of the person associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + personName: string; + /** + * An array containing a `PhoneNumber` object for each phone number associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + phoneNumbers: PhoneNumber[]; + /** + * An array of strings containing the Internet URLs associated with the contact. Nullable. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + urls: string[]; + } + /** + * The `CustomProperties` object represents custom properties that are specific to a particular mail item and specific to an Outlook add-in. + * For example, there might be a need for an add-in to save some data that's specific to the current message that activated the add-in. + * If the user revisits the same message in the future and activates the add-in again, the add-in will be able to retrieve the data that had + * been saved as custom properties. + * + * To learn more about `CustomProperties`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * When using custom properties in your add-in, keep in mind that: + * + * - Custom properties saved while in compose mode aren't transmitted to recipients of the mail item. When a message or appointment with custom + * properties is sent, its properties can be accessed from the item in the Sent Items folder. + * If you want to make custom data accessible to recipients, consider using + * {@link https://learn.microsoft.com/javascript/api/outlook/office.internetheaders | InternetHeaders} instead. + * + * - The maximum length of a `CustomProperties` JSON object is 2500 characters. + * + * - Outlook on Mac doesn't cache custom properties. If the user's network goes down, mail add-ins can't access their custom properties. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface CustomProperties { + /** + * Returns the value of the specified custom property. + * + * @returns The value of the specified custom property. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The name of the custom property to be returned. + */ + get(name: string): any; + /** + * Returns an object with all custom properties in a collection of name/value pairs. The following are equivalent. + * + * `customProps.get("name")` + * + * `var dictionary = customProps.getAll(); dictionary["name"]` + * + * You can iterate through the dictionary object to discover all `names` and `values`. + * + * @returns An object with all custom properties in a collection of name/value pairs. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getAll(): any; + /** + * Removes the specified property from the custom property collection. + * + * To make the removal of the property permanent, you must call the `saveAsync` method of the `CustomProperties` object. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The `name` of the property to be removed. + */ + remove(name: string): void; + /** + * Saves custom properties to a message or appointment. + * + * You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of the `CustomProperties` object. + * The saving action is asynchronous. + * + * It's a good practice to have your callback function check for and handle errors from `saveAsync`. + * In particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently the user becomes + * disconnected. + * If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would return an error. + * Your callback function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Important**: In Outlook on Windows, custom properties saved while in compose mode only persist after the item being composed is closed or + * after `Office.context.mailbox.item.saveAsync` is called. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, asyncContext?: any): void; + /** + * Saves custom properties to a message or appointment. + * + * You must call the `saveAsync` method to persist any changes made with the `set` method or the `remove` method of the `CustomProperties` object. + * The saving action is asynchronous. + * + * It's a good practice to have your callback function check for and handle errors from `saveAsync`. + * In particular, a read add-in can be activated while the user is in a connected state in a read form, and subsequently the user becomes + * disconnected. + * If the add-in calls `saveAsync` while in the disconnected state, `saveAsync` would return an error. + * Your callback function should handle this error accordingly. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param asyncContext - Optional. Any state data that is passed to the callback function. + */ + saveAsync(asyncContext?: any): void; + /** + * Sets the specified property to the specified value. + * + * The `set` method sets the specified property to the specified value. To ensure that the set property and value persist on the mail item, + * you must call the `saveAsync` method. + * + * The `set` method creates a new property if the specified property does not already exist; + * otherwise, the existing value is replaced with the new value. + * The `value` parameter can be of any type; however, it is always passed to the server as a string. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The name of the property to be set. + * @param value - The value of the property to be set. + */ + set(name: string, value: string): void; + } + /** + * The `DelayDeliveryTime` object enables you to manage the delayed delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface DelayDeliveryTime { + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the + * `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead. + */ + getAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay is processed on the server. + * This allows the message to be sent even if the Outlook client isn't running. In classic Outlook on Windows, the message doesn't appear in the + * **Outbox** folder, so you won't be able to edit the message or cancel its delivery after selecting **Send**. You'll only be able to review + * the message from the **Sent Items** folder. In Outlook on the web, on Mac, and in + * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, the message appears in the **Drafts** folder + * until the scheduled delivery time. While it's in the **Drafts** folder, you'll be able to edit the message before it's sent. + * To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery | Manage the delivery date and time of a message}. + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: When `item.delayDeliveryTime.setAsync` is used to schedule the delivery of a message, the delay is processed on the server. + * This allows the message to be sent even if the Outlook client isn't running. In classic Outlook on Windows, the message doesn't appear in the + * **Outbox** folder, so you won't be able to edit the message or cancel its delivery after selecting **Send**. You'll only be able to review + * the message from the **Sent Items** folder. In Outlook on the web, on Mac, and in + * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, the message appears in the **Drafts** folder + * until the scheduled delivery time. While it's in the **Drafts** folder, you'll be able to edit the message before it's sent. + * To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delay-delivery | Manage the delivery date and time of a message}. + * + * **Errors**: + * + * - `InvalidFormatError` - The format of the specified data object is not valid. + * + * @param datetime - The future date and time when the message should be sent. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property. + */ + setAsync(datetime: Date, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides diagnostic information to an Outlook add-in. + * + * @remarks + * + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + export interface Diagnostics { + /** + * Gets a string that represents the type of Outlook client. + * + * The string can be one of the following values: `Outlook`, `newOutlookWindows`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * + * @remarks + * + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: The `Outlook` value is returned for Outlook on Windows (classic) and on Mac. `newOutlookWindows` is returned for + * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}. + */ + hostName: string; + /** + * Gets a string that represents the version of either the Outlook client or the Exchange Server (for example, "15.0.468.0"). + * + * If the mail add-in is running in Outlook on Windows (classic), on Mac, or on mobile devices, the `hostVersion` property returns the version of the + * Outlook client. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the property returns the version of the Exchange Server. + * + * @remarks + * + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + hostVersion: string; + /** + * Gets a string that represents the current view of Outlook on the web. + * + * The returned string can be one of the following values: `OneColumn`, `TwoColumns`, or `ThreeColumns`. + * + * If the application is not Outlook on the web, then accessing this property results in undefined. + * + * Outlook on the web has three views that correspond to the width of the screen and the window, and the number of columns that can be displayed: + * + * - `OneColumn`, which is displayed when the screen is narrow. Outlook on the web uses this single-column layout on the entire screen of a + * smartphone. + * + * - `TwoColumns`, which is displayed when the screen is wider. Outlook on the web uses this view on most tablets. + * + * - `ThreeColumns`, which is displayed when the screen is wide. For example, Outlook on the web uses this view in a full screen window on a + * desktop computer. + * + * @remarks + * + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + OWAView: MailboxEnums.OWAView | "OneColumn" | "TwoColumns" | "ThreeColumns"; + } + /** + * Provides the email properties of the sender or specified recipients of an email message or appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface EmailAddressDetails { + /** + * Gets the SMTP email address. + */ + emailAddress: string; + /** + * Gets the display name associated with an email address. + */ + displayName: string; + /** + * Gets the response that an attendee returned for an appointment. + * This property applies to only an attendee of an appointment, as represented by the `optionalAttendees` or `requiredAttendees` property. + * This property returns undefined in other scenarios. + */ + appointmentResponse: MailboxEnums.ResponseType | string; + /** + * Gets the email address type of a recipient. + * + * @remarks + * **Important**: + * + * - A `recipientType` property value isn't returned by the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.from?view=outlook-js-1.7#outlook-office-from-getasync-member(1) | Office.context.mailbox.item.from.getAsync} + * and {@link https://learn.microsoft.com/javascript/api/outlook/office.organizer?view=outlook-js-1.7#outlook-office-organizer-getasync-member(1) | Office.context.mailbox.item.organizer.getAsync} methods. + * The email sender or appointment organizer is always a user whose email address is on the Exchange server. + * + * - While composing a mail item, when you switch to a sender account that's on a different domain than that of the previously selected sender account, + * the value of the `recipientType` property for existing recipients isn't updated and will still be based on the domain of the previously selected account. + * To get the correct recipient types after switching accounts, you must first remove the existing recipients, then add them back to the mail item. + */ + recipientType: MailboxEnums.RecipientType | string; + } + /** + * Represents an email account on an Exchange Server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface EmailUser { + /** + * Gets the display name associated with an email address. + */ + displayName: string; + /** + * Gets the SMTP email address. + */ + emailAddress: string; + } + /** + * Represents the set of locations on an appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface EnhancedLocation { + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers - The locations to be added to the current list of locations. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds to the set of locations associated with the appointment. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidFormatError`: The format of the specified data object is not valid. + * + * @param locationIdentifiers - The locations to be added to the current list of locations. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + addAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the set of locations associated with the appointment. + * + * **Note**: {@link https://support.microsoft.com/office/88ff6c60-0a1d-4b54-8c9d-9e1a71bc3023 | Personal contact groups} + * added as appointment locations aren't returned by this method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + getAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers - The locations to be removed from the current list of locations. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the set of locations associated with the appointment. + * + * If there are multiple locations with the same name, all matching locations will be removed even if only one was specified in `locationIdentifiers`. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param locationIdentifiers - The locations to be removed from the current list of locations. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. Check the `status` property of `asyncResult` to determine if the call succeeded. + */ + removeAsync(locationIdentifiers: LocationIdentifier[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides the current enhanced locations when the `Office.EventType.EnhancedLocationsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + export interface EnhancedLocationsChangedEventArgs { + /** + * Gets the set of enhanced locations. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + enhancedLocations: LocationDetails[]; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.8] + */ + type: "olkEnhancedLocationsChanged"; + } + /** + * Represents a collection of entities found in an email message or appointment. Read mode only. + * + * The `Entities` object is a container for the entity arrays returned by the `getEntities` and `getEntitiesByType` methods when the item + * (either an email message or an appointment) contains one or more entities that have been found by the server. + * You can use these entities in your code to provide additional context information to the viewer, such as a map to an address found in the item, + * or to open a dialer for a phone number found in the item. + * + * If no entities of the type specified in the property are present in the item, the property associated with that entity is null. + * For example, if a message contains a street address and a phone number, the addresses property and phoneNumbers property would contain + * information, and the other properties would be null. + * + * To be recognized as an address, the string must contain a United States postal address that has at least a subset of the elements of a street + * number, street name, city, state, and zip code. + * + * To be recognized as a phone number, the string must contain a North American phone number format. + * + * Entity recognition relies on natural language recognition that is based on machine learning of large amounts of data. + * The recognition of an entity is non-deterministic and success sometimes relies on the particular context in the item. + * + * When the property arrays are returned by the `getEntitiesByType` method, only the property for the specified entity contains data; + * all other properties are null. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface Entities { + /** + * Gets the physical addresses (street or mailing addresses) found in an email message or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + addresses: string[]; + /** + * Gets the contacts found in an email address or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + contacts: Contact[]; + /** + * Gets the email addresses found in an email message or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + emailAddresses: string[]; + /** + * Gets the meeting suggestions found in an email message. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + meetingSuggestions: MeetingSuggestion[]; + /** + * Gets the phone numbers found in an email message or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + phoneNumbers: PhoneNumber[]; + /** + * Gets the task suggestions found in an email message or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + taskSuggestions: string[]; + /** + * Gets the Internet URLs present in an email message or appointment. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + urls: string[]; + } + /** + * Provides a method to get the from value of a message in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: This interface is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + export interface From { + /** + * Gets the from value of a message. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. + * + * The from value of the item is provided as an {@link Office.EmailAddressDetails | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * The `value` property of the result is the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the from value of a message. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the from value of a message. + * + * The from value of the item is provided as an {@link Office.EmailAddressDetails | EmailAddressDetails} in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - This method is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + * To learn more about APIs supported in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - A `recipientType` property value isn't returned by the `getAsync` method. + * The email sender is always a user whose email address is on the Exchange server. + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * The `value` property of the result is the item's from value, as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides basic details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + export interface InfobarClickedEventArgs { + /** + * Gets additional details about the notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarDetails: InfobarDetails; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + type: "olkInfobarClicked"; + } + /** + * Provides additional details about the notification message that raised the `Office.EventType.InfobarClicked` event. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + export interface InfobarDetails { + /** + * The action type. Currently, "Dismiss" is the only supported action. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + actionType: MailboxEnums.InfobarActionType; + /** + * The notification type. + * + * @remarks + * [Api set: Mailbox 1.10] + */ + infobarType: MailboxEnums.InfobarType; + } + /** + * The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange + * and is converted to a MIME message. + * + * Internet headers are stored as string key-value pairs on a per-item basis. + * + * **Note**: This object is intended for you to set and get your custom headers on a message item. To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Recommended practices**: + * + * Currently, internet headers are a finite resource on a user's mailbox. When the quota is exhausted, you can't create any more internet headers + * on that mailbox, which can result in unexpected behavior from clients that rely on this to function. + * + * Apply the following guidelines when you create internet headers in your add-in. + * + * - Create the minimum number of headers required. The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * - Name headers so that you can reuse and update their values later. As such, avoid naming headers in a variable manner + * (for example, based on user input or a timestamp). + */ + export interface InternetHeaders { + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param names - The names of the internet headers to be returned. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method returns a record containing those internet headers and their values. + * If the add-in requests a header that isn't available, that header won't be returned in the results. + * + * **Note**: This method is intended to return the values of the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param names - The names of the internet headers to be returned. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. The string key-value pairs of internet headers are returned in the + * `asyncResult.value` property. Any errors encountered are provided in the `asyncResult.error` property. + */ + getAsync(names: string[], callback: (asyncResult: CommonAPI.AsyncResult>) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param names - The names of the internet headers to be removed. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Given an array of internet header names, this method removes the specified headers from the internet header collection. + * + * **Note**: This method is intended to remove the custom headers you set using the `setAsync` method. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param names - The names of the internet headers to be removed. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + removeAsync(names: string[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the specified internet headers to the specified values. + * + * The `setAsync` method creates a new header if the specified header doesn't already exist; otherwise, the existing value is replaced with + * the new value. + * + * **Note**: This method is intended to set the values of your custom headers. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The header quota is based on the total size of headers applied to a message. In Exchange Online, + * the header limit is capped at 256 KB, while in an Exchange on-premises environment, the limit is determined by your organization's administrator. + * For further information on header limits, see + * {@link https://learn.microsoft.com/office365/servicedescriptions/exchange-online-service-description/exchange-online-limits#message-limits | Exchange Online message limits} + * and {@link https://learn.microsoft.com/exchange/mail-flow/message-size-limits?view=exchserver-2019#types-of-message-size-limits | Exchange Server message limits}. + * + * @param headers - The names and corresponding values of the headers to be set. This should be a record object with its keys being internet header names + * and values being the corresponding header value strings. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, of type `Office.AsyncResult`. Any errors encountered are provided in the `asyncResult.error` property. + */ + setAsync(headers: Record, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The item namespace is used to access the currently selected message, meeting request, or appointment. + * You can determine the type of the item by using the `itemType` property. + * + * To see the full member list, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Organizer, Appointment Attendee, Message Compose, Message Read + */ + export interface Item { + } + /** + * The compose mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentCompose | AppointmentCompose} + * + * - {@link Office.MessageCompose | MessageCompose} + */ + export interface ItemCompose extends Item { + } + /** + * The read mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.AppointmentRead | AppointmentRead} + * + * - {@link Office.MessageRead | MessageRead} + */ + export interface ItemRead extends Item { + } + /** + * Represents a message in compose mode that's currently loaded. + * A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * determine if you can already access the required properties of the selected item through the + * `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + */ + export interface LoadedMessageCompose { + /** + * Gets the recipients on the **Bcc** (blind carbon copy) line of a message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + bcc: Recipients; + /** + * Gets the item's body and format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + */ + body: Body; + /** + * Gets an object that provides methods to manage the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + categories: Categories; + /** + * Gets recipients on the **Cc** (carbon copy) line of a message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + cc: Recipients; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + conversationId: string; + /** + * Gets the delayed delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the DelayDeliveryTime object is supported. + */ + delayDeliveryTime: DelayDeliveryTime; + /** + * Gets the email address of the sender of a message. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + from: From; + /** + * Gets the message ID of the original message being replied to by the current message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the user, such as changing the subject in a reply. + * + * - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's also the meeting organizer. + */ + inReplyTo: string; + /** + * Gets the custom internet headers of a message. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the InternetHeaders object is supported. + */ + internetHeaders: InternetHeaders; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the notification messages of the item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. + */ + notificationMessages: NotificationMessages; + /** + * Gets the sensitivity label of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * - Only the `getAsync` method of the SensitivityLabel object is supported. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + */ + seriesId: string; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets the entire subject of the item, as sent by the email server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the Subject object is supported. + */ + subject: Subject; + /** + * Gets the recipients on the **To** line of a message. + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + to: Recipients; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the `itemId` isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the `itemId` isn't recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to classic Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a message in read mode that's currently loaded. + * A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * determine if you can already access the required properties of the selected item through the + * `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + */ + export interface LoadedMessageRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. + * For more information, see + * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets the item's body and its format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + */ + body: Body; + /** + * Gets an object that provides methods to manage the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + categories: Categories; + /** + * Gets recipients on the **Cc** (carbon copy) line of a message. + * + * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + cc: EmailAddressDetails[]; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + conversationId: string; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets the date and time that the appointment is to end. + * + * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + end: Date; + /** + * Gets the email address of the sender of a message. + * + * The `from` property returns an `EmailAddressDetails` object. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. + */ + from: EmailAddressDetails; + /** + * Gets the internet message identifier of a message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, + * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. + */ + internetMessageId: string; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * The following table lists the default item classes for messages. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. + */ + itemClass: string; + /** + * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier} + * for the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `itemId` property isn't available in compose mode. + * If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier + * in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + * + * - The identifier returned by the `itemId` property is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}. + * The `itemId` property isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of a meeting request. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + location: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by + * email programs. To get the subject of the item with the prefixes intact, use the `subject` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + normalizedSubject: string; + /** + * Gets the notification messages of the item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Only the `getAllAsync` method of the NotificationMessages object is supported. + */ + notificationMessages: NotificationMessages; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that aren't meeting requests. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. + * + * - If the `recurrence` object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and *not* a part of a series. + * + * - Only the propeties and the `getAsync` method of the Recurrence object are supported. + */ + recurrence: Recurrence; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * - The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + */ + seriesId: string; + /** + * Gets the email address of the sender of an email message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. + */ + sender: EmailAddressDetails; + /** + * Gets the date and time that the appointment is to begin. + * + * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + start: Date; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + subject: string; + /** + * Gets the recipients on the **To** line of a message. + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + to: EmailAddressDetails[]; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule + * or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule or + * the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur + * in the property of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the + * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: Only the `get` and `getAll` methods of the CustomProperties object are supported. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a date and time in the local client's time zone. Read mode only. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface LocalClientTime { + /** + * Integer value representing the month, beginning with 0 for January to 11 for December. + */ + month: number; + /** + * Integer value representing the day of the month. + */ + date: number; + /** + * Integer value representing the year. + */ + year: number; + /** + * Integer value representing the hour on a 24-hour clock. + */ + hours: number; + /** + * Integer value representing the minutes. + */ + minutes: number; + /** + * Integer value representing the seconds. + */ + seconds: number; + /** + * Integer value representing the milliseconds. + */ + milliseconds: number; + /** + * Integer value representing the number of minutes difference between the local time zone and UTC. + */ + timezoneOffset: number; + } + /** + * Provides methods to get and set the location of a meeting in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Location { + /** + * Gets the location of an appointment. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. + * The location of the appointment is provided as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the location of an appointment. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the location of an appointment. + * The location of the appointment is provided as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the location of an appointment. + * + * The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @param location - The location of the appointment. The string is limited to 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(location: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the location of an appointment. + * + * The `setAsync` method starts an asynchronous call to the Exchange server to set the location of an appointment. + * Setting the location of an appointment overwrites the current location. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - DataExceedsMaximumSize: The location parameter is longer than 255 characters. + * + * @param location - The location of the appointment. The string is limited to 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the location fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(location: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a location. Read-only. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface LocationDetails { + /** + * The `LocationIdentifier` of the location. + */ + locationIdentifier: LocationIdentifier; + /** + * The location's display name. + */ + displayName: string; + /** + * The email address associated with the location. Only locations of type `Room` have an email address. + */ + emailAddress: string; + } + /** + * Represents the ID of a location. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface LocationIdentifier { + /** + * The location's unique ID. + * + * For `Room` type, it's the room's email address. + * + * For `Custom` type, it's the `displayName`. + */ + id: string; + /** + * The location's type. + */ + type: MailboxEnums.LocationType | string; + } + /** + * Provides access to the Microsoft Outlook add-in object model. + * + * Key properties: + * + * - `diagnostics`: Provides diagnostic information to an Outlook add-in. + * + * - `item`: Provides methods and properties for accessing a message or appointment in an Outlook add-in. + * + * - `userProfile`: Provides information about the user in an Outlook add-in. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface Mailbox { + /** + * Provides diagnostic information to an Outlook add-in. + * + * Contains the following members. + * + * - `hostName` (string): A string that represents the name of the Office application. + * It should be one of the following values: `Outlook`, `newOutlookWindows`, `OutlookWebApp`, `OutlookIOS`, or `OutlookAndroid`. + * **Note**: The "Outlook" value is returned for Outlook on Windows (classic) and on Mac. + * + * - `hostVersion` (string): A string that represents the version of either the Office application or the Exchange Server (e.g., "15.0.468.0"). + * If the mail add-in is running in Outlook on Windows (classic), on Mac, or on mobile devices, the `hostVersion` property returns the version of the + * Outlook client. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the property returns the version of the Exchange Server. + * + * - `OWAView` (`MailboxEnums.OWAView` or string): An enum (or string literal) that represents the current view of Outlook on the web. + * If the application is not Outlook on the web, then accessing this property results in undefined. + * Outlook on the web has three views (`OneColumn` - displayed when the screen is narrow, `TwoColumns` - displayed when the screen is wider, + * and `ThreeColumns` - displayed when the screen is wide) that correspond to the width of the screen and the window, and the number of columns + * that can be displayed. + * + * More information is under {@link Office.Diagnostics}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * Starting with Mailbox requirement set 1.5, you can also use the + * {@link https://learn.microsoft.com/javascript/api/office/office.context?view=outlook-js-1.5&preserve-view=true#office-office-context-diagnostics-member | Office.context.diagnostics} + * property to get similar information. + */ + diagnostics: Diagnostics; + /** + * Gets the URL of the Exchange Web Services (EWS) endpoint for this email account. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Your app must have the **read item** permission specified in its manifest to call the `ewsUrl` member in read mode. + * + * - In compose mode, you must call the `saveAsync` method before you can use the `ewsUrl` member. + * Your app must have **read/write item** permissions to call the `saveAsync` method. + * + * - This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - The `ewsUrl` value can be used by a remote service to make EWS calls to the user's mailbox. + * For example, you can create a remote service to {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + */ + ewsUrl: string; + /** + * The mailbox item. Depending on the context in which the add-in opened, the item type may vary. + * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: + * + * {@link Office.MessageCompose | MessageCompose}, {@link Office.MessageRead | MessageRead}, + * {@link Office.AppointmentCompose | AppointmentCompose}, {@link Office.AppointmentRead | AppointmentRead} + * + * **Important**: + * + * - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be turned on. + * For guidance on how to configure the Reading Pane, see + * {@link https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0 | Use and configure the Reading Pane to preview messages}. + * + * - `item` can be null if your add-in supports pinning the task pane. For details on how to handle, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler | Implement a pinnable task pane in Outlook}. + */ + item?: Item & ItemCompose & ItemRead & Message & MessageCompose & MessageRead & Appointment & AppointmentCompose & AppointmentRead; + /** + * Gets an object that provides methods to manage the categories master list associated with a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + masterCategories: MasterCategories; + /** + * Gets the URL of the REST endpoint for this email account. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service + * until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also + * applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your + * add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see + * {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}. + * + * - Your add-in must have the **read item** permission specified in its manifest to call the `restUrl` member in read mode. + * + * - In compose mode you must call the `saveAsync` method before you can use the `restUrl` member. + * Your add-in must have **read/write item** permissions to call the `saveAsync` method. + * However, in delegate or shared scenarios, you should instead use the `targetRestUrl` property of the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.sharedproperties#outlook-office-sharedproperties-targetresturl-member | SharedProperties} + * object (introduced in requirement set 1.8). For more information, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + */ + restUrl: string; + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. + * + * More information is under {@link Office.UserProfile} + */ + userProfile: UserProfile; + + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param options - Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Converts a supported ID into the Exchange Web Services (EWS) format. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - In February 2025, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. + * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, + * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. + * Nested app authentication (NAA) is the recommended approach for tokens going forward. For more information, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - Item IDs retrieved via a REST API (such as {@link https://graph.microsoft.io/ | Microsoft Graph}) use a different format than the format used by EWS. + * The `convertToEwsId` method converts a REST-formatted ID into the proper format for EWS. + * + * @param id - The ID to be converted into EWS format. This string can be an item ID formatted for the Outlook REST APIs or a conversation ID retrieved from + * `Office.context.mailbox.item.conversationId`. + * @param restVersion - A value indicating the version of the Outlook REST API used to retrieve the item ID. + */ + convertToEwsId(id: string, restVersion: MailboxEnums.RestVersion | string): string; + /** + * Gets a dictionary containing time information in local client time. + * + * The time zone used by the Outlook client varies by platform. + * Outlook on Windows (classic) and on Mac use the client computer time zone. + * Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows} use the time zone set on the Exchange Admin Center (EAC). + * You should handle date and time values so that the values you display on the user interface are always consistent with the time zone that the user expects. + * + * In Outlook on Windows (classic) and on Mac, the `convertToLocalClientTime` method returns a dictionary object with the values set to the client computer time zone. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, the `convertToLocalClientTime` method returns a dictionary object + * with the values set to the time zone specified in the EAC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param timeValue - A `Date` object. + */ + convertToLocalClientTime(timeValue: Date): LocalClientTime; + /** + * Converts a supported ID into REST format. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - Item IDs retrieved via Exchange Web Services (EWS) or via the `itemId` property use a different format than the format used by REST APIs (such as + * {@link https://graph.microsoft.io/ | Microsoft Graph}). The `convertToRestId` method converts an EWS-formatted ID into the proper format for REST. + * + * @param id - The ID to be converted into REST format. This string can be an item ID formatted for EWS that's usually retrieved from + * `Office.context.mailbox.item.itemId`, a conversation ID retrieved from `Office.context.mailbox.item.conversationId`, or a + * series ID retrieved from `Office.context.mailbox.item.seriesId`. + * @param restVersion - A value indicating the version of the Outlook REST API used with the converted ID. + */ + convertToRestId(id: string, restVersion: MailboxEnums.RestVersion | string): string; + /** + * Gets a `Date` object from a dictionary containing time information. + * + * The `convertToUtcClientTime` method converts a dictionary containing a local date and time to a `Date` object with the correct values for the + * local date and time. + * + * @returns A Date object with the time expressed in UTC. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param input - The local time value to convert. + */ + convertToUtcClientTime(input: LocalClientTime): Date; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentForm` method opens an existing calendar appointment in a new window on the desktop. + * + * In Outlook on Mac, you can use this method to display a single appointment that isn't part of a recurring series, or the master appointment + * of a recurring series. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and + * no error message is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + */ + displayAppointmentForm(itemId: string): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, or the master appointment + * of a recurring series. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and + * no error message is returned. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayAppointmentFormAsync(itemId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays an existing calendar appointment. + * + * The `displayAppointmentFormAsync` method opens an existing calendar appointment in a new window on the desktop or in a dialog box on + * mobile devices. + * + * In Outlook on Mac, you can use this method to display a single appointment that is not part of a recurring series, or the master appointment + * of a recurring series. However, you can't display an instance of the series because you can't access the properties + * (including the item ID) of instances of a recurring series. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and + * no error message is returned. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing calendar appointment. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayAppointmentFormAsync(itemId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageForm` method opens an existing message in a new window on the desktop. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier doesn't identify an existing message, no message will be displayed on the client computer, and + * no error message is returned. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - Don't use the `displayMessageForm` with an itemId that represents an appointment. Use the `displayAppointmentForm` method to display + * an existing appointment, and `displayNewAppointmentForm` to display a form to create a new appointment. + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + */ + displayMessageForm(itemId: string): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier does not identify an existing message, no message will be displayed on the client computer, and + * no error message is returned. + * + * Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayMessageFormAsync(itemId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays an existing message. + * + * The `displayMessageFormAsync` method opens an existing message in a new window on the desktop or in a dialog box on mobile devices. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method opens the specified form only if the body of the form is less than or equal to 32K characters. + * + * If the specified item identifier does not identify an existing message, no message will be displayed on the client computer, and + * no error message is returned. + * + * Don't use the `displayMessageForm` or `displayMessageFormAsync` method with an itemId that represents an appointment. + * Use the `displayAppointmentForm` or `displayAppointmentFormAsync` method to display an existing appointment, + * and `displayNewAppointmentForm` or `displayNewAppointmentFormAsync` to display a form to create a new appointment. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param itemId - The Exchange Web Services (EWS) identifier for an existing message. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayMessageFormAsync(itemId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentForm` method opens a form that enables the user to create a new appointment or meeting. + * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method always displays a form with an attendees field. + * If you don't specify any attendees as input arguments, the method displays a form with a **Save** button. + * If you have specified attendees, the form would include the attendees and a **Send** button. + * + * In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or + * `resources` parameter, this method displays a meeting form with a **Send** button. + * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * **Important**: This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + */ + displayNewAppointmentForm(parameters: AppointmentForm): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or meeting. + * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method always displays a form with an attendees field. + * If you do not specify any attendees as input arguments, the method displays a form with a **Save** button. + * If you have specified attendees, the form would include the attendees and a **Send** button. + * + * In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or + * `resources` parameter, this method displays a meeting form with a **Send** button. + * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a form for creating a new calendar appointment. + * + * The `displayNewAppointmentFormAsync` method opens a form that enables the user to create a new appointment or meeting. + * If parameters are specified, the appointment form fields are automatically populated with the contents of the parameters. + * + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * this method always displays a form with an attendees field. + * If you do not specify any attendees as input arguments, the method displays a form with a **Save** button. + * If you have specified attendees, the form would include the attendees and a **Send** button. + * + * In Outlook on Windows (classic) and on Mac, if you specify any attendees or resources in the `requiredAttendees`, `optionalAttendees`, or + * `resources` parameter, this method displays a meeting form with a **Send** button. + * If you don't specify any recipients, this method displays an appointment form with a **Save & Close** button. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - An `AppointmentForm` describing the new appointment. All properties are optional. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayNewAppointmentFormAsync(parameters: AppointmentForm, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageForm` method opens a form that enables the user to create a new message. If parameters are specified, the message form + * fields are automatically populated with the contents of the parameters. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. + * + * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. + * + * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. + * + * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. + * + * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. + * + * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + * + * `attachments`: An array of JSON objects that are either file or item attachments. + * + * `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` for an item attachment. + * + * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. + * + * `attachments.url`: Only used if the attachment type is set to `file`. The URI of the location for the file. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `attachments.isInline`: Only used if the attachment type is set to `file`. If true, indicates that the attachment will be shown inline as an image + * in the message body and won't be displayed in the attachment list. + * + * `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of the existing e-mail you want to attach to the new message. + * This is a string up to 100 characters. + */ + displayNewMessageForm(parameters: any): void; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. + * If parameters are specified, the message form fields are automatically populated with the contents of the parameters. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. + * + * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. + * + * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. + * + * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. + * + * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. + * + * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + * + * `attachments`: An array of JSON objects that are either file or item attachments. + * + * `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` for an item attachment. + * + * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. + * + * `attachments.url`: Only used if the attachment type is set to `file`. The URI of the location for the file. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `attachments.isInline`: Only used if the attachment type is set to `file`. If true, indicates that the attachment will be shown inline as an image + * in the message body and won't be displayed in the attachment list. + * + * `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of the existing e-mail you want to attach to the new message. + * This is a string up to 100 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayNewMessageFormAsync(parameters: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a form for creating a new message. + * + * The `displayNewMessageFormAsync` method opens a form that enables the user to create a new message. + * If parameters are specified, the message form fields are automatically populated with the contents of the parameters. + * + * If any of the parameters exceed the specified size limits, or if an unknown parameter name is specified, an exception is thrown. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + * + * @param parameters - A dictionary containing all values to be filled in for the user in the new form. All parameters are optional. + * + * `toRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **To** line. The array is limited to a maximum of 100 entries. + * + * `ccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Cc** line. The array is limited to a maximum of 100 entries. + * + * `bccRecipients`: An array of strings containing the email addresses or an array containing an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * for each of the recipients on the **Bcc** line. The array is limited to a maximum of 100 entries. + * + * `subject`: A string containing the subject of the message. The string is limited to a maximum of 255 characters. + * + * `htmlBody`: The HTML body of the message. The body content is limited to a maximum size of 32 KB. + * + * `attachments`: An array of JSON objects that are either file or item attachments. + * + * `attachments.type`: Indicates the type of attachment. Must be `file` for a file attachment or `item` for an item attachment. + * + * `attachments.name`: A string that contains the name of the attachment, up to 255 characters in length. + * + * `attachments.url`: Only used if the attachment type is set to `file`. The URI of the location for the file. **Important**: This link must be + * publicly accessible, without need for authentication by Exchange Online servers. However, with on-premises Exchange, the link can + * be accessible on a private network as long as it doesn't need further authentication. + * + * `attachments.isInline`: Only used if the attachment type is set to `file`. If true, indicates that the attachment will be shown inline as an image + * in the message body and won't be displayed in the attachment list. + * + * `attachments.itemId`: Only used if the attachment type is set to `item`. The EWS item ID of the existing e-mail you want to attach to the new message. + * This is a string up to 100 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayNewMessageFormAsync(parameters: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a string that contains a token used to call REST APIs or Exchange Web Services (EWS). + * + * The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. + * The lifetime of the callback token is 5 minutes. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - In February 2025, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. + * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, + * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. + * Nested app authentication (NAA) is the recommended approach for tokens going forward. For more information, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - The Outlook REST v2.0 and beta endpoints are now deprecated. However, privately released and AppSource-hosted add-ins are able to use the REST service + * until extended support ends for Outlook 2019 on October 14, 2025. Traffic from these add-ins is automatically identified for exemption. This exemption also + * applies to new add-ins developed after March 31, 2024. Although add-ins are able to use the REST service until 2025, we highly encourage you to migrate your + * add-ins to use {@link https://learn.microsoft.com/outlook/rest#outlook-rest-api-via-microsoft-graph | Microsoft Graph}. For guidance, see + * {@link https://learn.microsoft.com/outlook/rest/compare-graph | Compare Microsoft Graph and Outlook REST API endpoints}. + * + * - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + * + * - This method is only supported in read mode in Outlook on Android and on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - EWS operations aren't supported in add-ins running in Outlook on iOS and on Android. A REST token is always returned in Outlook + * mobile clients even if `options.isRest` is set to `false`. + * + * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * *REST Tokens* + * + * When a REST token is requested (`options.isRest` = `true`), the resulting token won't work to authenticate EWS calls. + * The token will be limited in scope to read-only access to the current item and its attachments, unless the add-in has specified the + * **read/write mailbox** permission in its manifest. + * If the **read/write mailbox** permission is specified, the resulting token will grant read/write access to mail, calendar, and contacts, + * including the ability to send mail. + * + * The add-in should use the `restUrl` property to determine the correct URL to use when making REST API calls. + * + * This API works for the following scopes. + * + * - `Mail.ReadWrite` + * + * - `Mail.Send` + * + * - `Calendars.ReadWrite` + * + * - `Contacts.ReadWrite` + * + * *EWS Tokens* + * + * When an EWS token is requested (`options.isRest` = `false`), the resulting token won't work to authenticate REST API calls. + * The token will be limited in scope to accessing the current item. + * + * The add-in should use the `ewsUrl` property to determine the correct URL to use when making EWS calls. + * + * You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} operation or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * **Errors**: + * + * If your call fails, use the {@link https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member | asyncResult.diagnostics} + * property to view details about the error. + * + * - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when the token can't be retrieved because legacy Exchange tokens + * for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the + * {@link https://aka.ms/naafaq | FAQ page}. + * + * - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + * + * - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more information.` - In Exchange Online environments, + * this error occurs when the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. + * For guidance on how to implement NAA, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - `NetworkError: The user is no longer connected to the network. Please check your network connection and try again.` + * + * @param options - An object literal that contains one or more of the following properties:- + * `isRest`: Determines if the token provided will be used for the Outlook REST APIs or Exchange Web Services. Default value is `false`. + * `asyncContext`: Any state data that is passed to the asynchronous method. + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. + */ + getCallbackTokenAsync(options: CommonAPI.AsyncContextOptions & { isRest?: boolean }, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a string that contains a token used to get an attachment or item from an Exchange Server. + * + * The `getCallbackTokenAsync` method makes an asynchronous call to get an opaque token from the Exchange Server that hosts the user's mailbox. + * The lifetime of the callback token is 5 minutes. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * [Api set: All support Read mode; Mailbox 1.3 introduced Compose mode support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - In February 2025, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. + * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, + * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. + * Nested app authentication (NAA) is the recommended approach for tokens going forward. For more information, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - You can pass both the token and either an attachment identifier or item identifier to an external system. That system uses + * the token as a bearer authorization token to call the Exchange Web Services (EWS) + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getattachment-operation | GetAttachment} or + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/getitem-operation | GetItem} operation to return an + * attachment or item. For example, you can create a remote service to + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/get-attachments-of-an-outlook-item | get attachments from the selected item}. + * + * - Calling the `getCallbackTokenAsync` method in read mode requires a minimum permission level of **read item**. + * + * - Calling the `getCallbackTokenAsync` method in compose mode requires you to have saved the item. + * The `saveAsync` method requires a minimum permission level of **read/write item**. + * + * - This method isn't supported in Outlook on Android or on iOS. EWS operations aren't supported in add-ins running in Outlook on mobile clients. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + * + * - For guidance on delegate or shared scenarios, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | shared folders and shared mailbox} article. + * + * **Errors**: + * + * If your call fails, use the {@link https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member | asyncResult.diagnostics} + * property to view details about the error. + * + * - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when the token can't be retrieved because legacy Exchange tokens + * for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the + * {@link https://aka.ms/naafaq | FAQ page}. + * + * - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + * + * - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more information.` - In Exchange Online environments, + * this error occurs when the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. + * For guidance on how to implement NAA, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - `NetworkError: The user is no longer connected to the network. Please check your network connection and try again.` + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. + * @param userContext - Optional. Any state data that is passed to the asynchronous method. + */ + getCallbackTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Returns true if the current mailbox is managed by {@link https://learn.microsoft.com/mem/intune/fundamentals/what-is-intune | Microsoft Intune}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0.To learn more about APIs supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `MAMServiceNotAvailable`: The client is unable to fetch the mobile application management (MAM) policy. + * + * @returns True if the current mailbox is managed by Microsoft Intune. + */ + getIsIdentityManaged(): boolean; + /** + * Returns true if an organization's {@link https://learn.microsoft.com/mem/intune/apps/app-management | Intune mobile application management (MAM) policy} + * allows an add-in to access data from the specified location. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn more about APIs supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `InvalidOpenLocationInput`: The value of the specified location is invalid. + * + * - `MAMServiceNotAvailable`: The client is unable to fetch the MAM policy. + * + * @param openLocation - The location from which the add-in is attempting to access data. + * + * @returns True if an organization's Intune MAM policy allows an add-in to access data from the specified location. + */ + getIsOpenFromLocationAllowed(openLocation: MailboxEnums.OpenLocation): boolean; + /** + * Returns true if an organization's {@link https://learn.microsoft.com/mem/intune/apps/app-management | Intune mobile application management (MAM) policy} + * allows an add-in to save data to the specified location. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method is only supported in Outlook on Android and on iOS starting in Version 4.2443.0. To learn more about APIs supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `InvalidSaveLocationInput`: The value of the specified location is invalid. + * + * - `MAMServiceNotAvailable`: The client is unable to fetch the MAM policy. + * + * @param saveLocation - The location in which the add-in is attempting to save data. + * + * @returns True if an organization's Intune MAM policy allows an add-in to save data to the specified location. + */ + getIsSaveToLocationAllowed(saveLocation: MailboxEnums.SaveLocation): boolean; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time. + * To learn more about item multi-select, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: This method only applies to messages. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of + * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which + * messages were selected. + */ + getSelectedItemsAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a token identifying the user and the Office Add-in. + * + * The token is returned as a string in the `asyncResult.value` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - In February 2025, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. + * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, + * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. + * Nested app authentication (NAA) is the recommended approach for tokens going forward. For more information, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - The `getUserIdentityTokenAsync` method returns a token that you can use to identify and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication | authenticate the add-in and user with an external system}. + * + * - This method isn't supported if you load an add-in in an Outlook.com or Gmail mailbox. + * + * **Errors**: + * + * If your call fails, use the {@link https://learn.microsoft.com/javascript/api/office/office.asyncresult#office-office-asyncresult-diagnostics-member | asyncResult.diagnostics} + * property to view details about the error. + * + * - `GenericTokenError: An internal error has occurred.` - In Exchange Online environments, this error occurs when the token can't be retrieved because legacy Exchange tokens + * for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. For guidance on how to implement NAA, see the + * {@link https://aka.ms/naafaq | FAQ page}. + * + * - `HTTPRequestFailure: The request has failed. Please look at the diagnostics object for the HTTP error code.` + * + * - `InternalServerError: The Exchange server returned an error. Please look at the diagnostics object for more information.` - In Exchange Online environments, + * this error occurs when the token can't be retrieved because legacy Exchange tokens for Outlook add-ins are turned off. We recommend using NAA as a single sign-on solution for your add-in. + * For guidance on how to implement NAA, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - `NetworkError: The user is no longer connected to the network. Please check your network connection and try again.` + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of + * type `Office.AsyncResult`. + * The token is returned as a string in the `asyncResult.value` property. + * If there was an error, the `asyncResult.error` and `asyncResult.diagnostics` properties may provide additional information. + * @param userContext - Optional. Any state data that is passed to the asynchronous method. + */ + getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Loads a single mail item by its Exchange Web Services (EWS) ID. + * Then, gets an object that provides the properties and methods of the loaded item. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: + * + * - This method only applies to messages. + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * call `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be loaded one at a time. + * + * - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can already access the required properties of the + * selected item using the `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + * + * - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + * + * @param itemId - The EWS ID of a selected item. + * @param options - An object literal that contains the `asyncContext` property. + * In this property, provide any object you wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned + * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. + */ + loadItemByIdAsync(itemId: string, options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Loads a single mail item by its Exchange Web Services (EWS) ID. + * Then, gets an object that provides the properties and methods of the loaded item. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: + * + * - This method only applies to messages. + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * call `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be loaded one at a time. + * + * - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can already access the required properties of the + * selected item using the `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + * + * - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + * + * @param itemId - The EWS ID of a selected item. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned + * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. + */ + loadItemByIdAsync(itemId: string, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. + * + * The `makeEwsRequestAsync` method sends an EWS request on behalf of the add-in to Exchange. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - In February 2025, legacy Exchange {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#exchange-user-identity-token | user identity} and + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/authentication#callback-tokens | callback} tokens will be turned off by default for all Exchange Online tenants. + * This is part of {@link https://blogs.microsoft.com/on-the-issues/2023/11/02/secure-future-initiative-sfi-cybersecurity-cyberattacks/ | Microsoft's Secure Future Initiative}, + * which gives organizations the tools needed to respond to the current threat landscape. Exchange user identity tokens will still work for Exchange on-premises. + * Nested app authentication (NAA) is the recommended approach for tokens going forward. For more information, see the {@link https://aka.ms/naafaq | FAQ page}. + * + * - To enable the `makeEwsRequestAsync` method to make EWS requests, the server administrator must set `OAuthAuthentication` to `true` on the + * Client Access Server EWS directory . + * + * - Your add-in must have the **read/write mailbox** permission to use the `makeEwsRequestAsync` method. + * For information about using the **read/write mailbox** permission and the EWS operations that you can call with the `makeEwsRequestAsync` method, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Specify permissions for mail add-in access to the user's mailbox}. + * + * - If your add-in needs to access Folder Associated Items or its XML request must specify UTF-8 encoding (`\`), + * it must use Microsoft Graph or REST APIs to access the user's mailbox instead. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - This method isn't supported when the add-in is loaded in a Gmail mailbox. + * + * - When you use the `makeEwsRequestAsync` method in add-ins that run in Outlook versions earlier than Version 15.0.4535.1004, you must set + * the encoding value to ISO-8859-1 (``). To determine the version of an Outlook client, use the + * `mailbox.diagnostics.hostVersion` property. You don't need to set the encoding value when your add-in is running in Outlook on the web or + * {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}. + * To determine the Outlook client in which your add-in is running, use the `mailbox.diagnostics.hostName` property. + * + * @param data - The EWS request. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The XML response of the EWS request is provided as a string + * in the `asyncResult.value` property. In Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic (starting in Version 2303, Build 16225.10000)), + * and on Mac (starting in Version 16.73 (23042601)), if the response exceeds 5 MB in size, an error message is returned in the `asyncResult.error` property. + * In earlier versions of Outlook on Windows (classic) and on Mac, an error message is returned if the response exceeds 1 MB in size. + * @param userContext - Optional. Any state data that is passed to the asynchronous method. + */ + makeEwsRequestAsync(data: any, callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @param options - Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Mailbox object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.5] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param eventType - The event that should revoke the handler. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The `MailboxEvent` object is passed as an argument to the event handler of an add-in that implements + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/autolaunch | event-based activation}, including + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts}, + * or the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting feature}. + * It allows the add-in to signify to the Outlook client that it has completed processing an event. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: Support for the integrated spam-reporting feature was introduced in Mailbox 1.14. + */ + export interface MailboxEvent { + /** + * Indicates that the event-based or spam-reporting add-in has completed processing an event. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Support for the integrated spam-reporting feature was introduced in Mailbox 1.14. + * + * - Support to assign a `SmartAlertsEventCompletedOptions` object to the `options` parameter was introduced in Mailbox 1.12. + * + * @param options - Optional. An object that specifies the behavior of an event-based or spam-reporting add-in when it completes processing an event. + */ + completed(options?: SmartAlertsEventCompletedOptions | SpamReportingEventCompletedOptions): void; + } + /** + * Represents the categories master list on the mailbox. + * + * In Outlook, a user can tag messages and appointments by using a category to color-code them. + * The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item. + * + * **Important**: In delegate or shared scenarios, the delegate can get the categories in the master list but can't add or remove categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface MasterCategories { + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `DuplicateCategory`: One of the categories provided is already in the master category list. + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be added to the master list on the mailbox. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + addAsync(categories: CategoryDetails[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If adding categories fails, the `asyncResult.error` property will contain an error code. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the master list of categories on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes categories from the master list on a mailbox. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Errors**: + * + * - `PermissionDenied`: The user does not have permission to perform this action. + * + * @param categories - The categories to be removed from the master list on the mailbox. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing categories fails, the `asyncResult.error` property will contain an error code. + */ + removeAsync(categories: string[], callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a suggested meeting found in an item. Read mode only. + * + * The list of meetings suggested in an email message is returned in the `meetingSuggestions` property of the `Entities` object that's returned when + * the `getEntities` or `getEntitiesByType` method is called on the active item. + * + * The start and end values are string representations of a `Date` object that contains the date and time at which the suggested meeting is to + * begin and end. The values are in the default time zone specified for the current user. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface MeetingSuggestion { + /** + * Gets the attendees for a suggested meeting. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + attendees: EmailUser[]; + /** + * Gets the date and time that a suggested meeting is to end. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + end: string; + /** + * Gets the location of a suggested meeting. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + location: string; + /** + * Gets a string that was identified as a meeting suggestion. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + meetingString: string; + /** + * Gets the date and time that a suggested meeting is to begin. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + start: string; + /** + * Gets the subject of a suggested meeting. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + subject: string; + } + /** + * A subclass of {@link Office.Item | Item} for messages. + * + * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * Child interfaces: + * + * - {@link Office.MessageCompose | MessageCompose} + * + * - {@link Office.MessageRead | MessageRead} + */ + export interface Message extends Item { + } + /** + * The message compose mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: + * + * - This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be turned on. + * For guidance on how to configure the Reading Pane, see + * {@link https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0 | Use and configure the Reading Pane to preview messages}. + * + * Parent interfaces: + * + * - {@link Office.ItemCompose | ItemCompose} + * + * - {@link Office.Message | Message} + */ + export interface MessageCompose extends Message, ItemCompose { + /** + * Gets an object that provides methods to get or update the recipients on the **Bcc** (blind carbon copy) line of a message. + * + * Depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients you can get or update. + * See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + bcc: Recipients; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can't use the API to manage categories on a message in Compose mode. + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns a `Recipients` object that provides methods to get or update the recipients on the + * **Cc** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + cc: Recipients; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * If the user sets a subject and saves the item, the `conversationId` property will return a value. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + conversationId: string; + /** + * Gets or sets the delayed delivery date and time of a message. + * + * The `delayDeliveryTime` property returns a `DelayDeliveryTime` object that provides methods to manage the delivery date and time of the message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + delayDeliveryTime: DelayDeliveryTime; + /** + * Gets the email address of the sender of a message. + * + * The `from` property returns a `From` object that provides a method to get the from value. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This property is supported in Outlook on Android and on iOS. For a sample scenario, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/mobile-event-based | Implement event-based activation in Outlook mobile add-ins}. + */ + from: From; + /** + * Gets the message ID of the original message being replied to by the current message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the user, such as changing the subject in a reply. + * + * - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's also the meeting organizer. + */ + inReplyTo: string; + /** + * Gets or sets the custom internet headers of a message. + * + * The `internetHeaders` property returns an `InternetHeaders` object that provides methods to manage the internet headers on the message. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The internet headers API is supported in Outlook on Android and on iOS starting in Version 4.2405.0. + * To learn more about features supported in Outlook on mobile devices, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + internetHeaders: InternetHeaders; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + notificationMessages: NotificationMessages; + /** + * Gets the object to get or set the {@link Office.SensitivityLabel | sensitivity label} of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac, + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in Outlook on Android and on iOS, the seriesId returns the REST ID of the parent item. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that are not meeting requests. + */ + seriesId: string; + /** + * Manages the {@link Office.SessionData | SessionData} of an item in Compose mode. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + sessionData: SessionData; + /** + * Gets or sets the description that appears in the subject field of an item. + * + * The `subject` property gets or sets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a `Subject` object that provides methods to get and set the subject. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + subject: Subject; + /** + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `to` property returns a `Recipients` object that provides methods to get or update the recipients on the + * **To** line of the message. However, depending on the client/platform (i.e., Windows, Mac, etc.), limits may apply on how many recipients + * you can get or update. See the {@link Office.Recipients | Recipients} object for more details. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + to: Recipients; + + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * @remarks + * [Api set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new Outlook on Windows] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, use the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't return a `Cache-Control` header that + * specifies `no-cache`, `no-store`, or similar options in the HTTP response. However, when you're developing the add-in and making changes to files, + * caching can prevent you from seeing your changes. We recommend using `Cache-Control` headers during development. + * + * - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `isInline`: If true, indicates that the attachment will be shown inline as an image in the message body and won't be displayed in the attachment list. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: CommonAPI.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentAsync` method uploads the file at the specified URI and attaches it to the item in the compose form. + * + * @remarks + * [Api set: Mailbox 1.1 for Outlook on Windows (classic) and on Mac, Mailbox 1.8 for Outlook on the web and new Outlook on Windows] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - In recent builds of classic Outlook on Windows, a bug was introduced that incorrectly appends an `Authorization: Bearer` header to + * this action (whether using this API or the Outlook UI). To work around this issue, use the `addFileAttachmentFromBase64` API + * introduced with requirement set 1.8. + * + * - The URI of the file to be attached must support caching in production. The server hosting the image shouldn't return a `Cache-Control` header that + * specifies `no-cache`, `no-store`, or similar options in the HTTP response. However, when you're developing the add-in and making changes to files, + * caching can prevent you from seeing your changes. We recommend using `Cache-Control` headers during development. + * + * - You can use the same URI with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that is not allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param uri - The URI that provides the location of the file to attach to the message or appointment. The maximum length is 2048 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of + * the error. + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. + * This method returns the attachment identifier in the `asyncResult.value` object. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `isInline`: If true, indicates that the attachment will be shown inline as an image in the message body and won't be displayed in the attachment list. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of the error. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, options: CommonAPI.AsyncContextOptions & { isInline: boolean }, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a file to a message or appointment as an attachment. + * + * The `addFileAttachmentFromBase64Async` method uploads the file from the Base64 encoding and attaches it to the item in the compose form. + * This method returns the attachment identifier in the `asyncResult.value` object. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Adding an inline Base64 file to a message in compose mode is supported in Outlook on Android and on iOS. For more information on supported APIs in + * Outlook mobile, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you're using a data URL API (for example, `readAsDataURL`), you need to strip out the data URL prefix, then send the rest of the string to this API. + * For example, if the full string is represented by `data:image/svg+xml;base64,`, remove `data:image/svg+xml;base64,`. + * + * - If you're adding an inline Base64 image to the body of a message or appointment being composed, you must first get the current item body using the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.body#outlook-office-body-getasync-member(1) | Office.context.mailbox.item.body.getAsync} + * method before inserting the image using `addFileAttachmentFromBase64Async`. Otherwise, the image won't render in the body once it's inserted. + * For further guidance, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/add-and-remove-attachments-to-an-item-in-a-compose-form#attach-a-file | Attach a file}. + * + * **Errors**: + * + * - `AttachmentSizeExceeded`: The attachment is larger than allowed. + * + * - `FileTypeNotSupported`: The attachment has an extension that isn't allowed. + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB). + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type Office.AsyncResult. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If uploading the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of the error. + */ + addFileAttachmentFromBase64Async(base64File: string, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the `eventType` parameter passed to `addHandlerAsync`. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback function, if needed. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * If your Office Add-in is running in Outlook on the web or {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `addItemAttachmentAsync` method can attach items to items other than the item that you are editing. However, this isn't supported and isn't recommended. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If adding the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message or appointment. + * + * The `addItemAttachmentAsync` method attaches the item with the specified Exchange identifier to the item in the compose form. + * If you specify a callback function, the method is called with one parameter, `asyncResult`, which contains either the attachment identifier or + * a code that indicates any error that occurred while attaching the item. You can use the options parameter to pass state information to the + * callback function, if needed. + * + * You can subsequently use the identifier with the `removeAttachmentAsync` method to remove the attachment in the same session. + * + * If your Office Add-in is running in Outlook on the web or {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `addItemAttachmentAsync` method can attach items to items other than the item that you are editing. However, this isn't supported and isn't recommended. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments. + * + * @param itemId - The Exchange identifier of the item to attach. The maximum length is 100 characters. + * @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the attachment identifier will be provided in the `asyncResult.value` property. + * If adding the attachment fails, the `asyncResult` object will contain an `Error` object that provides a description of + * the error. + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Closes the current item that is being composed. + * + * The behavior of the `close` method depends on the current state of the item being composed. + * If the item has unsaved changes, the client prompts the user to save, discard, or close the action. + * + * In Outlook on Windows (classic) and on Mac, the `close` method has no effect on a reply in the Reading Pane. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * if the item is an appointment and it has previously been saved using `saveAsync`, the user is prompted to save, discard, or cancel even if no changes + * have occurred since the item was last saved. + * + * **Tip**: Use the + * {@link https://learn.microsoft.com/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-closeasync-member(1) | closeAsync} + * method instead of the `close` method if you want your add-in to: + * + * - Automatically discard a message being composed without prompting the user with the save dialog. + * + * - Determine when a user cancels the save item dialog on a message being composed. + * + * - Close a reply in the Reading Pane or an existing draft. + */ + close(): void; + /** + * Closes the current message being composed with the option to discard unsaved changes. + * The message being composed can be a new message, reply, or an existing draft. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog and the `discardItem` property isn't defined or is set to `false`. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft and the `discardItem` property isn't defined or + * is set to `false`. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `discardItem`: If `true`, the current message being composed is closed and unsaved changes are discarded. When the parameter isn't declared or is + * set to `false`, a save dialog appears prompting the user to save a draft, discard changes, or cancel the operation. This behavior occurs for new messages and replies + * popped out from the Reading Pane. If you want to close a reply in the Reading Pane or an existing draft, you must set `discardItem` to `true`. Otherwise, the call will + * return an error. For more information on the error, see the Remarks section. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + closeAsync(options: CommonAPI.AsyncContextOptions & { discardItem: boolean }, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Closes the current new message being composed. + * + * The behavior on a new message being composed depends on whether the message contains any unsaved changes. If no changes have been made, the message is + * closed without a save dialog. On the other hand, if the message contains unsaved changes, a save dialog appears prompting the user to save a draft, + * discard changes, or cancel the operation. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `The operation was cancelled by the user`: The user selects **Cancel** from the save dialog. + * + * - `The operation is not supported`: The `closeAsync` method attempts to close a reply in the Reading Pane or an existing draft. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + closeAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Windows (classic) and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Disables the Outlook client signature. + * + * The behavior of this method depends on which client the add-in is running. + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the signature option for new mails, replies, and forwards is disabled. + * A signature that's selected is also disabled by the method. + * + * - In Outlook on Windows (classic) and on Mac, the signature under the **New messages** and **Replies/forwards** sections + * of the sending account is set to **(none)**. + * + * - In Outlook on Android and on iOS, the signature saved on the mobile device is cleared. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Message Compose on Outlook on Android and on iOS starting in Version 4.2352.0. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + disableClientSignatureAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: This method is supported in Outlook on Android and on iOS starting in Version 4.2352.0. + * For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the item ID isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` (for example, to get an item ID to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the item ID isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. + * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. + * + * To access the selected data from the callback function, call `asyncResult.value.data`. + * To access the source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. + * If `Html`, the method returns the selected text, whether it is plaintext or HTML. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getSelectedDataAsync(coercionType: CommonAPI.CoercionType | string, options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * + * If there is no selection but the cursor is in the body or subject, the method returns an empty string for the selected data. + * If a field other than the body or subject is selected, the method returns the `InvalidSelection` error. + * + * To access the selected data from the callback function, call `asyncResult.value.data`. + * To access the source property that the selection comes from, call `asyncResult.value.sourceProperty`, which will be either `body` or `subject`. + * + * @returns + * The selected data as a string with format determined by `coercionType`. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param coercionType - Requests a format for the data. If `Text`, the method returns the plain text as a string, removing any HTML tags present. + * If `Html`, the method returns the selected text, whether it is plaintext or HTML. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getSelectedDataAsync(coercionType: CommonAPI.CoercionType | string, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to classic Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to classic Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic) and on Mac, the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac, or disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic) and on Mac, the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or on Mac, or disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get, set, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Removes an attachment from a message or appointment. + * + * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. + * To remove an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + * Use the {@link https://learn.microsoft.com/javascript/api/outlook/office.body | Office.Body} APIs to get and set the body of an item. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows (new and classic). + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` property will contain an error code + * with the reason for the failure. + */ + removeAttachmentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes an attachment from a message or appointment. + * + * The `removeAttachmentAsync` method removes the attachment with the specified identifier from the item. + * As a best practice, you should use the attachment identifier to remove an attachment only if the same mail app has added that attachment + * in the same session. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. + * A session is over when the user closes the app, or if the user starts composing an inline form then subsequently pops out the form to + * continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * *Important**: The `removeAttachmentAsync` method doesn't remove inline attachments from a mail item. + * To remove an inline attachment, first get the item's body, then remove any references of the attachment from its contents. + * Use the {@link https://learn.microsoft.com/javascript/api/outlook/office.body | Office.Body} APIs to get and set the body of an item. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment to remove. The maximum string length of the `attachmentId` + * is 200 characters in Outlook on the web and on Windows (new and classic). + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If removing the attachment fails, the `asyncResult.error` property will contain an error code + * with the reason for the failure. + */ + removeAttachmentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param eventType - The event that should revoke the handler. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * `coercionType`: If text, the current style is applied in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac. + * If the field is an HTML editor, only the text data is inserted, even if the data is HTML. + * If the data is HTML and the field supports HTML (the subject doesn't), the current style is applied in + * Outlook on the web and new Outlook on Windows. The default style is applied in Outlook on Windows (classic) and on Mac. + * If the field is a text field, an `InvalidDataFormat` error is returned. + * If `coercionType` is not set, the result depends on the field: + * if the field is HTML then HTML is used; if the field is text, then plain text is used. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setSelectedDataAsync(data: string, options: CommonAPI.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + * + * The `setSelectedDataAsync` method inserts the specified string at the cursor location in the subject or body of the item, or, if text is + * selected in the editor, it replaces the selected text. If the cursor is not in the body or subject field, an error is returned. + * After insertion, the cursor is placed at the end of the inserted content. + * + * @remarks + * [Api set: Mailbox 1.2] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param data - The data to be inserted. Data is not to exceed 1,000,000 characters. + * If more than 1,000,000 characters are passed in, an `ArgumentOutOfRange` exception is thrown. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setSelectedDataAsync(data: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The message read mode of {@link Office.Item | Office.context.mailbox.item}. + * + * **Important**: + * + * - This is an internal Outlook object, not directly exposed through existing interfaces. + * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. + * + * - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be turned on. + * For guidance on how to configure the Reading Pane, see + * {@link https://support.microsoft.com/office/2fd687ed-7fc4-4ae3-8eab-9f9b8c6d53f0 | Use and configure the Reading Pane to preview messages}. + * + * Parent interfaces: + * + * - {@link Office.ItemRead | ItemRead} + * + * - {@link Office.Message | Message} + */ + export interface MessageRead extends Message, ItemRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. + * For more information, see + * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets an object that provides methods for manipulating the body of an item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + body: Body; + /** + * Gets an object that provides methods for managing the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + categories: Categories; + /** + * Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + cc: EmailAddressDetails[]; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * If the user sets a subject and saves the item, the `conversationId` property will return a value. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + conversationId: string; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets the date and time that the appointment is to end. + * + * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + end: Date; + /** + * Gets the email address of the sender of a message. + * + * The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. + * + * The `from` property returns an `EmailAddressDetails` object. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + from: EmailAddressDetails; + /** + * Gets the internet message identifier for an email message. + * + * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, + * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + internetMessageId: string; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * The following table lists the default item classes for messages. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. + */ + itemClass: string; + /** + * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `itemId` property isn't available in compose mode. + * If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier + * in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of a meeting request. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + location: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by + * email programs. To get the subject of the item with the prefixes intact, use the `subject` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + normalizedSubject: string; + /** + * Gets the notification messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + notificationMessages: NotificationMessages; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that are not meeting requests. + * + * **Note**: Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. + * + * **Note**: If the `recurrence` object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and NOT a part of a series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + recurrence: Recurrence; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), and on Mac, + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * However, in Outlook on Android and on iOS, the `seriesId` returns the REST ID of the parent item. + * + * **Note**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property is not identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + seriesId: string; + /** + * Gets the email address of the sender of an email message. + * + * The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * **Note**: The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + sender: EmailAddressDetails; + /** + * Gets the date and time that the appointment is to begin. + * + * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + start: Date; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets or sets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + subject: string; + /** + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Android, classic Mac UI, iOS: 100 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * - New Mac UI: No limit + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + to: EmailAddressDetails[]; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should invoke the handler. + * @param handler - The function to handle the event. The function must accept a single parameter, which is an object literal. + * The `type` property on the parameter will match the eventType `parameter` passed to `addHandlerAsync`. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + addHandlerAsync(eventType: CommonAPI.EventType | string, handler: any, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllForm` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyAllForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyForm` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + */ + displayReplyForm(formData: string | ReplyFormData): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web, on mobile devices, and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the entities found in the selected item's body. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + */ + getEntities(): Entities; + /** + * Gets an array of all the entities of the specified entity type found in the selected item's body. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @returns + * If the value passed in `entityType` is not a valid member of the `EntityType` enumeration, the method returns `null`. + * If no entities of the specified type are present in the item's body, the method returns an empty array. + * Otherwise, the type of the objects in the returned array depends on the type of entity requested in the `entityType` parameter. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param entityType - One of the `EntityType` enumeration values. + */ + getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array; + /** + * Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest file. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @returns + * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the + * add-in manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a + * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an + * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * @param name - The name of the `ItemHasKnownEntity` rule element that defines the filter to match. + */ + getFilteredEntitiesByName(name: string): Array; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an add-in only manifest file. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule. + * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an add-in only manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the add-in manifest file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * - This method isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Gets the entities found in a highlighted match a user has selected. Highlighted matches apply to contextual add-ins. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getSelectedEntities(): Entities; + /** + * Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file. + * Highlighted matches apply to contextual add-ins. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file. + * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule. + * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that's specified by that rule. + * The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - This method isn't supported in Outlook on iOS or Android. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the + * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: This method isn't supported in Outlook on iOS or on Android. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get, set, save, and remove custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. + * + * For supported events, refer to the Item object model + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param eventType - The event that should revoke the handler. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeHandlerAsync(eventType: CommonAPI.EventType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The definition of the action for a notification message. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: In modern Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `NotificationMessageAction` object is available in Compose mode only. + */ + export interface NotificationMessageAction { + /** + * The type of action to be performed. + * `ActionType.ShowTaskPane` is the only supported action. + */ + actionType: string | MailboxEnums.ActionType; + /** + * The text of the action link. + */ + actionText: string; + /** + * The button defined in the manifest. + */ + commandId: string; + /** + * Any JSON data the action button needs to pass on to the add-in. + * + * @remarks + * + * **Important**: + * + * - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier versions of Outlook on Windows, only the `string` + * type is supported. + * + * - To retrieve the JSON data, call `Office.context.mailboxitem.getInitializationContextAsync`. If you create a JSON string using + * `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using `JSON.parse()` once you retrieve it. + */ + contextData: any; + } + /** + * An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface NotificationMessageDetails { + /** + * The identifier for the notification message. + */ + key?: string; + /** + * Specifies the `ItemNotificationMessageType` of message. + * + * If type is `ProgressIndicator` or `ErrorMessage`, an icon is automatically supplied + * and the message is not persistent. Therefore the icon and persistent properties are not valid for these types of messages. + * Including them will result in an `ArgumentException`. + * + * If type is `ProgressIndicator`, the developer should remove or replace the progress indicator when the action is complete. + * + * **Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + */ + type: MailboxEnums.ItemNotificationMessageType | string; + /** + * A reference to an icon that is defined in the manifest. It appears in the infobar area. + * It is applicable if the type is `InformationalMessage`, and is required if the type is `InsightMessage`. + * Specifying this parameter for an unsupported type results in an exception. + * + * **Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g., Mac, web browser). + */ + icon?: string; + /** + * The text of the notification message. Maximum length is 150 characters. + * If the developer passes in a longer string, an `ArgumentOutOfRange` exception is thrown. + */ + message: string; + /** + * Specifies if the message should be persistent. Only applicable when type is `InformationalMessage`. + * If true, the message remains until removed by this add-in or dismissed by the user. + * If false, it is removed when the user navigates to a different item. + * For error notifications, the message persists until the user sees it once. + * Specifying this parameter for an unsupported type throws an exception. + */ + persistent?: Boolean; + /** + * Specifies actions for the message. Limit: 1 action. This limit doesn't count the "Dismiss" action which is included by default. + * Only applicable when the type is `InsightMessage`. + * Specifying this property for an unsupported type or including too many actions throws an error. + * + * **Important**: In modern Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the `actions` property is available in Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + actions?: NotificationMessageAction[]; + } + /** + * The `NotificationMessages` object is returned as the `notificationMessages` property of an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface NotificationMessages { + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a `NumberOfNotificationMessagesExceeded` error. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @param key - A developer-specified key used to reference this notification message. + * Developers can use it to modify this message later. It can't be longer than 32 characters. + * @param JSONmessage - A JSON object that contains the notification message to be added to the item. + * It contains a `NotificationMessageDetails` object. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a notification to an item. + * + * There are a maximum of 5 notifications per message. Setting more will return a `NumberOfNotificationMessagesExceeded` error. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **Important**: + * + * - Only one notification of type {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} + * is allowed per add-in. Attempting to add more will throw an error. + * + * - In modern Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * you can add an `InsightMessage` notification only in Compose mode. + * + * - Only the `InformationalMessage` type is supported in Outlook on Android and on iOS. + * + * @param key - A developer-specified key used to reference this notification message. + * Developers can use it to modify this message later. It can't be longer than 32 characters. + * @param JSONmessage - A JSON object that contains the notification message to be added to the item. + * It contains a `NotificationMessageDetails` object. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is an array of `NotificationMessageDetails` objects. + */ + getAllAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns all keys and messages for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is an array of `NotificationMessageDetails` objects. + */ + getAllAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to remove. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + removeAsync(key: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to remove. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + removeAsync(key: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage - A JSON object that contains the new notification message to replace the existing message. + * It contains a `NotificationMessageDetails` object. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Replaces a notification message that has a given key with another message. + * + * If a notification message with the specified key doesn't exist, `replaceAsync` will add the notification. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param key - The key for the notification message to replace. It can't be longer than 32 characters. + * @param JSONmessage - A JSON object that contains the new notification message to replace the existing message. + * It contains a `NotificationMessageDetails` object. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides the updated Office theme that raised the `Office.EventType.OfficeThemeChanged` event. + * + * @remarks + * [Api set: Mailbox 1.14] + */ + export interface OfficeThemeChangedEventArgs { + /** + * Gets the updated Office theme. + * + * @remarks + * [Api set: Mailbox 1.14] + */ + officeTheme: CommonAPI.OfficeTheme; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.14] + */ + type: "officeThemeChanged"; + } + /** + * Represents the appointment organizer, even if an alias or a delegate was used to create the appointment. + * This object provides a method to get the organizer value of an appointment in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Organizer { + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the organizer value of an appointment as an {@link Office.EmailAddressDetails | EmailAddressDetails} object + * in the `asyncResult.value` property. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: A `recipientType` property value isn't returned by the getAsync method. + * The appointment organizer is always a user whose email address is on the Exchange server. + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `AsyncResult` object. The `value` property of the result is the appointment's organizer value, + * as an `EmailAddressDetails` object. + */ + getAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a phone number identified in an item. Read mode only. + * + * An array of `PhoneNumber` objects containing the phone numbers found in an email message is returned in the `phoneNumbers` property of the + * `Entities` object that's returned when you call the `getEntities` method on the selected item. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface PhoneNumber { + /** + * Gets a string containing a phone number. This string contains only the digits of the telephone number and excludes characters + * like parentheses and hyphens, if they exist in the original item. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + phoneString: string; + /** + * Gets the text that was identified in an item as a phone number. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + originalPhoneString: string; + /** + * Gets a string that identifies the type of phone number: Home, Work, Mobile, Unspecified. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + type: string; + } + /** + * Represents recipients of an item. Compose mode only. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Recipients { + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), on Mac (classic UI), on Android, and on iOS. + * However, take note of the following: + * + * - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` property will contain an error code. + */ + addAsync(recipients: Array, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Adds a recipient list to the existing recipients for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `addAsync` method, you can add a maximum of 100 recipients to a mail item in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), on Mac (classic UI), on Android, and on iOS. + * However, take note of the following: + * + * - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. + * If you need to add more than 100 recipients to a mail item, you can call `addAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `addAsync` method isn't supported in Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `addAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. If adding the recipients fails, the `asyncResult.error` property will contain an error code. + */ + addAsync(recipients: Array, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * In classic Outlook on Windows, the appointment organizer is included in the object returned by the `getAsync` method when you create a new appointment or edit an + * existing one. In Outlook on the web and new Outlook on Windows, the organizer is only included in the returned object when you edit an existing appointment. + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows (new and classic), if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. + * For more details, see {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * While composing a mail item, when you switch to a sender account that's on a different domain than that of the previously selected sender account, + * the value of the `recipientType` property for existing recipients isn't updated and will still be based on the domain of the previously selected account. + * To get the correct recipient types after switching accounts, you must first remove the existing recipients, then add them back to the mail item. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets a recipient list for an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The maximum number of recipients returned by this method varies per Outlook client. + * + * - Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), web browser, Mac (classic UI): 500 recipients + * + * - Android, iOS: 100 recipients + * + * - Mac (new UI): No limit + * + * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics. + * + * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name. + * + * - A Teams meeting status icon appears before the recipient's name or email address. + * + * - A semicolon appears after the recipient's name or email address. + * + * - The recipient's name or email address is underlined or enclosed in a box. + * + * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from + * the auto-complete list. + * + * In Outlook on the web and on Windows (new and classic), if a user creates a new message by activating a contact's email address link from their contact + * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated + * {@link Office.EmailAddressDetails | EmailAddressDetails} object instead of the contact's saved name. + * For more details, see {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}. + * + * While composing a mail item, when you switch to a sender account that's on a different domain than that of the previously selected sender account, + * the value of the `recipientType` property for existing recipients isn't updated and will still be based on the domain of the previously selected account. + * To get the correct recipient types after switching accounts, you must first remove the existing recipients, then add them back to the mail item. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * of type `Office.AsyncResult`. The `asyncResult.value` property of the result is an array of + * {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), on Mac (classic UI), on Android, and on iOS. + * However, take note of the following: + * + * - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will contain a code that + * indicates any error that occurred while adding the data. + */ + setAsync(recipients: Array, options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets a recipient list for an appointment or message. + * + * The `setAsync` method overwrites the current recipient list. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: With the `setAsync` method, you can set a maximum of 100 recipients in Outlook on the web, on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), on Mac (classic UI), on Android, and on iOS. + * However, take note of the following: + * + * - In Outlook on the web, on Windows (new and classic), and on Mac (classic UI), you can have a maximum of 500 recipients in a target field. + * If you need to set more than 100 recipients, you can call `setAsync` repeatedly, but be mindful of the recipient limit of the field. + * + * - In Outlook on Android and on iOS, the `setAsync` method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * There's no recipient limit if you call `setAsync` in Outlook on Mac (new UI). + * + * **Errors**: + * + * - `NumberOfRecipientsExceeded`: The number of recipients exceeded 100 entries. + * + * @param recipients - The recipients to add to the recipients list. The array of recipients can contain strings of SMTP email addresses, + * {@link Office.EmailUser | EmailUser} objects, or {@link Office.EmailAddressDetails | EmailAddressDetails} objects. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the recipients fails the `asyncResult.error` property will contain a code that + * indicates any error that occurred while adding the data. + */ + setAsync(recipients: Array, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides change status of recipients fields when the `Office.EventType.RecipientsChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecipientsChangedEventArgs { + /** + * Gets an object that indicates change state of recipients fields. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + changedRecipientFields: RecipientsChangedFields; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecipientsChanged"; + } + /** + * Represents `RecipientsChangedEventArgs.changedRecipientFields` object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecipientsChangedFields { + /** + * Gets if recipients in the **bcc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + bcc: boolean + /** + * Gets if recipients in the **cc** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + cc: boolean; + /** + * Gets if optional attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + optionalAttendees: boolean; + /** + * Gets if required attendees were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + requiredAttendees: boolean; + /** + * Gets if resources were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + resources: boolean; + /** + * Gets if recipients in the **to** field were changed. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + to: boolean; + } + /** + * The `Recurrence` object provides methods to get and set the recurrence pattern of appointments but only get the recurrence pattern of + * meeting requests. + * It will have a dictionary with the following keys: `seriesTime`, `recurrenceType`, `recurrenceProperties`, and `recurrenceTimeZone` (optional). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * **States** + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    StateEditable?Viewable?
    Appointment Organizer - Compose SeriesYes (setAsync)Yes (getAsync)
    Appointment Organizer - Compose InstanceNo (setAsync returns error)Yes (getAsync)
    Appointment Attendee - Read SeriesNo (setAsync not available)Yes (item.recurrence)
    Appointment Attendee - Read InstanceNo (setAsync not available)Yes (item.recurrence)
    Meeting Request - Read SeriesNo (setAsync not available)Yes (item.recurrence)
    Meeting Request - Read InstanceNo (setAsync not available)Yes (item.recurrence)
    + */ + export interface Recurrence { + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceProperties?: RecurrenceProperties; + /** + * Gets or sets the properties of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceTimeZone?: RecurrenceTimeZone; + /** + * Gets or sets the type of the recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + recurrenceType: MailboxEnums.RecurrenceType | string; + /** + * The {@link Office.SeriesTime | SeriesTime} object enables you to manage the start and end dates of the recurring appointment series and + * the usual start and end times of instances. **This object is not in UTC time.** + * Instead, it is set in the time zone specified by the `recurrenceTimeZone` value or defaulted to the item's time zone. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + seriesTime: SeriesTime; + + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the result is a `Recurrence` object. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Returns the current recurrence object of an appointment series. + * + * This method returns the entire `Recurrence` object for the appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the result is a `Recurrence` object. + */ + getAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before its start time. + * + * @param recurrencePattern - A recurrence object. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + setAsync(recurrencePattern: Recurrence, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the recurrence pattern of an appointment series. + * + * **Note**: `setAsync` should only be available for series items and not instance items. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before its start time. + * + * @param recurrencePattern - A recurrence object. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + setAsync(recurrencePattern: Recurrence, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides updated recurrence object that raised the `Office.EventType.RecurrenceChanged` event. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + export interface RecurrenceChangedEventArgs { + /** + * Gets the updated recurrence object. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + recurrence: Recurrence; + /** + * Gets the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.7] + */ + type: "olkRecurrenceChanged"; + } + /** + * Represents the properties of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface RecurrenceProperties { + /** + * Represents the period between instances of the same recurring series. + */ + interval: number; + /** + * Represents the day of the month. + */ + dayOfMonth?: number; + /** + * Represents the day of the week or type of day, for example, weekend day vs weekday. + */ + dayOfWeek?: MailboxEnums.Days | string; + /** + * Represents the set of days for this recurrence. Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + days?: MailboxEnums.Days[] | string[]; + /** + * Represents the number of the week in the selected month e.g., 'first' for first week of the month. + */ + weekNumber?: MailboxEnums.WeekNumber | string; + /** + * Represents the month. + */ + month?: MailboxEnums.Month | string; + /** + * Represents your chosen first day of the week otherwise the default is the value in the current user's settings. + * Valid values are: 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', and 'Sun'. + */ + firstDayOfWeek?: MailboxEnums.Days | string; + } + /** + * Represents the time zone of the recurrence. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface RecurrenceTimeZone { + /** + * Represents the name of the recurrence time zone. + */ + name: MailboxEnums.RecurrenceTimeZone | string; + + /** + * Integer value representing the difference in minutes between the local time zone and UTC at the date that the meeting series began. + */ + offset?: number; + } + /** + * A file or item attachment. Used when displaying a reply form. + */ + export interface ReplyFormAttachment { + /** + * Indicates the type of attachment. Must be file for a file attachment or item for an item attachment. + */ + type: string; + /** + * A string that contains the name of the attachment, up to 255 characters in length. + */ + name: string; + /** + * Only used if type is set to file. The URI of the location for the file. + * + * **Important**: This link must be publicly accessible, without need for authentication by Exchange Online servers. However, with + * on-premises Exchange, the link can be accessible on a private network as long as it doesn't need further authentication. + */ + url?: string; + /** + * Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be + * displayed in the attachment list. + */ + inLine?: boolean; + /** + * Only used if type is set to item. The EWS item ID of the attachment. This is a string up to 100 characters. + */ + itemId?: string; + } + /** + * A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form. + */ + export interface ReplyFormData { + /** + * A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB. + */ + htmlBody?: string; + /** + * An array of {@link Office.ReplyFormAttachment | ReplyFormAttachment} that are either file or item attachments. + */ + attachments?: ReplyFormAttachment[]; + /** + * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + callback?: (asyncResult: CommonAPI.AsyncResult) => void; + /** + * An object literal that contains the following property:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + */ + options?: CommonAPI.AsyncContextOptions; + } + /** + * The settings created by using the methods of the `RoamingSettings` object are saved per add-in and per user. + * That is, they are available only to the add-in that created them, and only from the user's mailbox in which they are saved. + * + * While the Outlook add-in API limits access to these settings to only the add-in that created them, these settings shouldn't be considered + * secure storage. They can be accessed by Exchange Web Services or Extended MAPI. + * They shouldn't be used to store sensitive information, such as user credentials or security tokens. + * + * The name of a setting is a String, while the value can be a String, Number, Boolean, null, Object, or Array. + * + * The `RoamingSettings` object is accessible via the `roamingSettings` property in the `Office.context` namespace. + * + * To learn more about `RoamingSettings`, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **Important**: + * + * - The `RoamingSettings` object is initialized from the persisted storage only when the add-in is first loaded. + * For task panes, this means that it's only initialized when the task pane first opens. + * If the task pane navigates to another page or reloads the current page, the in-memory object is reset to its initial values, even if + * your add-in has persisted changes. + * The persisted changes will not be available until the task pane (or item in the case of UI-less add-ins) is closed and reopened. + * + * - When set and saved through Outlook on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} or classic) or on Mac, + * these settings are reflected in Outlook on the web only after a browser refresh. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface RoamingSettings { + /** + * Retrieves the specified setting. + * + * @returns Type: String | Number | Boolean | Object | Array + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The case-sensitive name of the setting to retrieve. + */ + get(name: string): any; + /** + * Removes the specified setting. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The case-sensitive name of the setting to remove. + */ + remove(name: string): void; + /** + * Saves the settings. + * + * Any settings previously saved by an add-in are loaded when it's initialized, so during the lifetime of the session you can just use + * the set and get methods to work with the in-memory copy of the settings property bag. + * When you want to persist the settings so that they're available the next time the add-in is used, use the `saveAsync` method. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + saveAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets or creates the specified setting. + * + * The `set` method creates a new setting of the specified name if it doesn't already exist, or sets an existing setting of the specified name. + * The value is stored in the document as the serialized JSON representation of its data type. + * + * A maximum of 32KB is available for the settings of each add-in. An error with code 9057 is thrown when that size limit is exceeded. + * + * Any changes made to settings using the `set` method will not be saved to the server until the `saveAsync` method is called. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * @param name - The case-sensitive name of the setting to set or create. + * @param value - Specifies the value to be stored. + */ + set(name: string, value: any): void; + } + /** + * Represents the properties of a message that's currently selected in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + export interface SelectedItemDetails { + /** + * The identifier of the message conversation that contains the message that's currently selected. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + conversationId: string; + /** + * Returns `true` if the message that's currently selected contains an attachment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + hasAttachment: boolean; + /** + * The internet message identifier of the message that's currently selected. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + internetMessageId: string; + /** + * The Exchange Web Services (EWS) item identifier of the message that's currently selected. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + itemId: string; + /** + * The Outlook mode (`Read` or `Compose`) of the message that's currently selected. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + itemMode: string; + /** + * The type of the item that's currently selected. `Message` is the only supported type at this time. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * The description that appears in the subject field of the message that's currently selected. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read + */ + subject: string; + } + /** + * Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see + * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Sensitivity { + /** + * Gets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, and + * Outlook on Mac only support Normal and Private sensitivity levels. If you call `getAsync` on an appointment that has a Confidential or Personal sensitivity + * level from these clients, the Normal sensitivity level is returned in the `asyncResult.value` property. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The sensitivity level of the appointment is returned in the `asyncResult.value` property. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * and Outlook on Mac only support Normal and Private sensitivity levels. If you call `getAsync` on an appointment that has a Confidential or Personal + * sensitivity level from these clients, the Normal sensitivity level is returned in the `asyncResult.value` property. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The sensitivity level of the appointment is returned in the `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * and Outlook on Mac only support Normal and Private sensitivity levels. + * + * **Errors**: + * + * - `Unsupported API parameter`: Setting the sensitivity level of an appointment isn't supported. + * + * @param sensitivity - The sensitivity level as an enum or string. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the sensitivity level of an appointment. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, and + * Outlook on Mac only support Normal and Private sensitivity levels. + * + * **Errors**: + * + * - `Unsupported API parameter`: Setting the sensitivity level of an appointment isn't supported. + * + * @param sensitivity - The sensitivity level as an enum or string. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + setAsync(sensitivity: MailboxEnums.AppointmentSensitivityType | string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides methods to get or set the sensitivity label of a message or appointment. For more information on sensitivity labels, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | Learn about sensitivity labels}. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabel { + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the unique identifier (GUID) of the sensitivity label applied to a message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The sensitivity label's GUID is returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + setAsync(sensitivityLabel: string | SensitivityLabelDetails, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Applies the specified sensitivity label to the message or appointment being composed. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Tip**: To determine the sensitivity labels available for use, call the `Office.context.sensitivityLabelsCatalog.getAsync` method. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param sensitivityLabel - The sensitivity label to be applied to the message or appointment being composed. The parameter value can be a sensitivity label's + * unique identifier (GUID) or a {@link Office.SensitivityLabelDetails | SensitivityLabelDetails} object. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + setAsync(sensitivityLabel: string | SensitivityLabelDetails, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Provides the change status of the sensitivity label applied to a message or appointment in compose mode. This information is provided when the + * `Office.EventType.SensitivityLabelChanged` event is raised. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelChangedEventArgs { + /** + * The type of event that was raised. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.13] + */ + type: "olkSensitivityLabelChanged"; + } + /** + * Represents the properties of available sensitivity labels in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelDetails { + /** + * The color of the sensitivity label. + */ + color: string; + /** + * The {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels#sublabels-grouping-labels | sublabels} of the sensitivity label. + * Returns `null` if a label doesn't have any sublabels. + */ + children: SensitivityLabelDetails[]; + /** + * The unique identifier (GUID) of the sensitivity label. + */ + id: string; + /** + * The name of the sensitivity label. + */ + name: string; + /** + * The description of the sensitivity label. + */ + tooltip: string; + } + /** + * Provides methods to check the status of the catalog of {@link https://learn.microsoft.com/microsoft-365/compliance/sensitivity-labels | sensitivity labels} + * in Outlook and retrieve all available sensitivity labels if the catalog is enabled. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + export interface SensitivityLabelsCatalog { + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all the sensitivity labels that are enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * **Recommended**: To determine whether the catalog of sensitivity labels is enabled in Outlook, call `getIsEnabledAsync` before using `getAsync`. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The available sensitivity labels and their properties are returned in the + * `asyncResult.value` property. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Checks whether the catalog of sensitivity labels is enabled in Outlook. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: The catalog of sensitivity labels is configured by an organization's administrator. For more information, see + * {@link https://learn.microsoft.com/microsoft-365/compliance/get-started-with-sensitivity-labels | Get started with sensitivity labels}. + * + * **Important**: To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The status of the catalog of sensitivity labels is returned in the `asyncResult.value` property. + */ + getIsEnabledAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * The `SeriesTime` object provides methods to get and set the dates and times of appointments in a recurring series and get the dates and times + * of meeting requests in a recurring series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface SeriesTime { + /** + * Gets the duration in minutes of a usual instance in a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getDuration(): number; + /** + * Gets the end date of a recurrence pattern in the following + * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getEndDate(): string; + /** + * Gets the end time of a usual appointment or meeting request instance of a recurrence pattern in whichever time zone that the user or + * add-in set the recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: + * "THH:mm:ss:mmm". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getEndTime(): string; + /** + * Gets the start date of a recurrence pattern in the following + * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getStartDate(): string; + /** + * Gets the start time of a usual appointment instance of a recurrence pattern in whichever time zone that the user/add-in set the + * recurrence pattern using the following {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} format: "THH:mm:ss:mmm". + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + getStartTime(): string; + /** + * Sets the duration of all appointments in a recurrence pattern. This will also change the end time of the recurrence pattern. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param minutes - The length of the appointment in minutes. + */ + setDuration(minutes: number): void; + /** + * Sets the end date of a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param year - The year value of the end date. + * @param month - The month value of the end date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. + * @param day - The day value of the end date. + */ + setEndDate(year: number, month: number, day: number): void; + /** + * Sets the end date of a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param date - End date of the recurring appointment series represented in the + * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + */ + setEndDate(date: string): void; + /** + * Sets the start date of a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param year - The year value of the start date. + * @param month - The month value of the start date. Valid range is 0-11 where 0 represents the 1st month and 11 represents the 12th month. + * @param day - The day value of the start date. + */ + setStartDate(year:number, month:number, day:number): void; + /** + * Sets the start date of a recurring appointment series. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param date - Start date of the recurring appointment series represented in the + * {@link https://www.iso.org/iso-8601-date-and-time-format.html | ISO 8601} date format: "YYYY-MM-DD". + */ + setStartDate(date:string): void; + /** + * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set + * (the item's time zone is used by default). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param hours - The hour value of the start time. Valid range: 0-24. + * @param minutes - The minute value of the start time. Valid range: 0-59. + */ + setStartTime(hours: number, minutes: number): void; + /** + * Sets the start time of all instances of a recurring appointment series in whichever time zone the recurrence pattern is set + * (the item's time zone is used by default). + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param time - Start time of all instances represented by standard datetime string format: "THH:mm:ss:mmm". + */ + setStartTime(time: string): void; + } + /** + * Provides methods to manage an item's session data. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface SessionData { + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + clearAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Clears all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + clearAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets all session data key-value pairs. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + getAllAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the session data value of the specified key. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + getAsync(name: string, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeAsync(name: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Removes a session data key-value pair. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param name - The session data key. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + removeAsync(name: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets a session data key-value pair. + * + * **Important**: The entire SessionData object is limited to 50,000 characters per add-in. + * + * @remarks + * [Api set: Mailbox 1.11] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + + * @param name - The session data key. + * @param value - The session data value as a string. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + setAsync(name: string, value: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information on how this object is used, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface SharedProperties { + /** + * The email address of the owner of a shared item. + */ + owner: string; + /** + * The REST API's base URL (currently `https://outlook.office.com/api`). + * + * Use with `targetMailbox` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetRestUrl: string; + /** + * The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client. + * + * Use with `targetRestUrl` to construct the REST operation's URL. + * + * Example usage: `targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"` + */ + targetMailbox: string; + /** + * The permissions that the delegate has on a shared folder, or the user has on a shared mailbox. + */ + delegatePermissions: MailboxEnums.DelegatePermissions; + } + /** + * Specifies the behavior of a {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts add-in} + * when it completes processing an `OnMessageSend` or `OnAppointmentSend` event. + * + * @remarks + * + * [Api set: Mailbox 1.12] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface SmartAlertsEventCompletedOptions { + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler, + * this value indicates if the handled event should continue execution or be canceled. + * For example, an add-in that handles the `OnMessageSend` or `OnAppointmentSend` event can set `allowEvent` to `false` to cancel the sending of an item. + * For a complete sample, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.12] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + allowEvent?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`, + * this property customizes the text of the **Don't Send** button in the Smart Alerts dialog. Custom text must be 20 characters or less. + * + * For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + cancelLabel?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`, + * this property specifies the ID of the task pane or function that runs when the **Don't Send** button is selected from the Smart Alerts dialog. + * + * For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#customize-the-dont-send-button-optional | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * The `commandId` value must match the task pane or function ID specified in the manifest of your add-in. The markup depends on the type of manifest your + * add-in uses. + * + * - **Add-in only manifest**: The `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element representing the task pane or function. + * + * - **Unified manifest for Microsoft 365**: The "id" property of the task pane or function command in the "controls" array. + * + * If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane or function ID to the `commandId` option. + * Otherwise, the JSON data assigned to `contextData` is ignored. + */ + commandId?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler and set its `allowEvent` property to `false`, + * this property specifies any JSON data passed to the add-in for processing when the **Don't Send** button is selected from the Smart Alerts dialog. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: + * + * - In Outlook on Windows, the `any` type is supported starting in Version 2402 (Build 17308.20000). In earlier versions of Outlook on Windows, only the `string` + * type is supported. + * + * - If you specify the `contextData` option in your `event.completed` call, you must also assign a task pane ID to the `commandId` option. + * Otherwise, the JSON data assigned to `contextData` is ignored. + * + * - To retrieve the value of the `contextData` property, you must call `Office.context.mailbox.item.getInitializationContextAsync` in the JavaScript implementation + * of your task pane. If you create a JSON string using `JSON.stringify()` and assign it to the `contextData` property, you must parse the string using + * `JSON.parse()` once you retrieve it. + */ + contextData?: any; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler and set its `allowEvent` property + * to `false`, this property sets the error message that will be displayed to the user. For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.12] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + errorMessage?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler + * and set its `allowEvent` property to `false`, this property sets the error message displayed to the user. The error message is formatted using Markdown. For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important** + * + * - The formatted error message must be 500 characters or less. + * + * - For guidance on supported Markdown elements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#limitations-to-formatting-the-dialog-message-using-markdown | Limitations to formatting the dialog message using Markdown}. + * + * - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property. + * This ensures that the message is displayed properly in Outlook clients that don't support Markdown. + */ + errorMessageMarkdown?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler + * and set its `allowEvent` property to `false`, this property overrides the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#available-send-mode-options | send mode option} + * specified in the manifest at runtime. + * + * For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough#override-the-send-mode-option-at-runtime-optional | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: Currently, `sendModeOverride` can only be set to the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#prompt-user | prompt user} option. + */ + sendModeOverride?: MailboxEnums.SendModeOverride | string; + } + /** + * Provides information about the `Office.EventType.SpamReporting` event that occurs when an unsolicited message is reported. + * + * @remarks + * [Api set: Mailbox 1.14] + */ + export interface SpamReportingEventArgs { + /** + * The text provided by the user in the preprocessing dialog of a spam-reporting add-in. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * To add an optional text box to the preprocessing dialog of your spam-reporting add-in, you must configure the + * {@link https://learn.microsoft.com/javascript/api/manifest/preprocessingdialog#child-elements | FreeTextLabel} + * element in the manifest of your add-in. + * + * To learn more about how to develop a spam-reporting add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | Implement an integrated spam-reporting add-in}. + */ + freeText: string; + /** + * Returns `true` for each reporting option selected by the user in the preprocessing dialog of a spam-reporting add-in. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * The order of the booleans in the array corresponds to the order of the reporting options specified in the + * {@link https://learn.microsoft.com/javascript/api/manifest/reportingoptions | ReportingOptions} + * element of your add-in's manifest. + * + * To learn more about how to develop a spam-reporting add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | Implement an integrated spam-reporting add-in}. + */ + options: boolean[]; + /** + * The type of event that was raised. For details, see {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}. + * + * @remarks + * [Api set: Mailbox 1.14] + */ + type: "SpamReporting"; + } + /** + * Specifies the behavior of an {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting add-in} + * after it completes processing a + * {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | SpamReporting} event. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + export interface SpamReportingEventCompletedOptions { + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal that a reported message has finished processing, + * this property specifies the Outlook mailbox folder to which the message will be moved. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - If the specified folder doesn't exist yet, it will be created before the message is moved. + * + * - If the `postProcessingAction` property is set to `moveToCustomFolder`, the `folderName` property must be specified. + * Otherwise, the reported message is moved to the **Junk Email** folder of the mailbox. If `postProcessingAction` is set to another action other than `moveToCustomFolder`, + * the `folderName` property is ignored. + */ + folderName?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal that a reported message has finished processing, + * this property specifies whether the message is moved to a different folder in the mailbox. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - You can only use this property in a spam-reporting add-in in Outlook on the web, on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} + * and classic (starting in Version 2308, Build 16724.10000)), and on Mac. If you're using an earlier build of classic Outlook on Windows that supports the + * integrated spam-reporting feature, use the `postProcessingAction` property instead. + * + * - If the property is set to `Office.MailboxEnums.MoveSpamItemTo.CustomFolder`, you must specify the name of the folder to which + * the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `moveItemTo` property will default to + * `Office.MailboxEnums.MoveSpamItemTo.JunkFolder` and move the reported message to the **Junk Email** folder. + */ + moveItemTo?: MailboxEnums.MoveSpamItemTo; + /** + * When set to `true`, deletes a reported message if an error occurs while the message is processed. + * If this property is set to `false` or isn't specified in the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method}, + * the reported message remains in its current mailbox folder. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + onErrorDeleteItem?: boolean; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal that a reported message has finished processing, + * this property specifies whether the message is moved to a different folder in the mailbox. The following post-processing actions are available. + * + * - `delete` - Moves the reported message to the **Deleted Items** folder of the mailbox. + * + * - `moveToCustomFolder` - Moves the reported message to a specified folder. You must specify the name of the folder in the `folderName` property. + * + * - `moveToSpamFolder` - Moves the reported message to the **Junk Email** folder of the mailbox. + * + * - `noMove` - Leaves the reported message in its current folder. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on Windows, you can only use this property in earlier builds that support the integrated spam-reporting feature. + * If you're on Version 2308 (Build 16724.10000) or later, use the `moveItemTo` property instead. + * + * - This property isn't supported in Outlook on the web, on Mac, or in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}. + * Use the `moveItemTo` property instead. + * + * - If the property is set to `moveToCustomFolder`, you must specify the name of the folder to which + * the message will be moved in the `folderName` property of the `event.completed` call. Otherwise, the `postProcessingAction` property will default to + * `moveToSpamFolder` and move the reported message to the **Junk Email** folder. + */ + postProcessingAction?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal that a reported message has finished processing, + * this property indicates if a post-processing dialog is shown to the user. The JSON object assigned to this property must contain a title and a description. + * If this property isn't specified, a dialog isn't shown to the user once their reported message is processed. + * + * @remarks + * + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + showPostProcessingDialog?: object; + } + /** + * Provides methods to get and set the subject of an appointment or message in an Outlook add-in. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Subject { + /** + * Gets the subject of an appointment or message. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the subject of an appointment or message. + * + * The `getAsync` method starts an asynchronous call to the Exchange server to get the subject of an appointment or message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is the subject of the item. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the subject of an appointment or message. + * + * The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. + * + * @param subject - The subject of the appointment or message. The string is limited to 255 characters. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the subject of an appointment or message. + * + * The `setAsync` method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. + * Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important**: In Outlook on Android and on iOS, this method isn't supported in the Message Compose mode. Only the Appointment Organizer mode is + * supported. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + * + * **Errors**: + * + * - `DataExceedsMaximumSize`: The subject parameter is longer than 255 characters. + * + * @param subject - The subject of the appointment or message. The string is limited to 255 characters. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. If setting the subject fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(subject: string, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Represents a suggested task identified in an item. Read mode only. + * + * The list of tasks suggested in an email message is returned in the `taskSuggestions` property of the {@link Office.Entities | Entities} object + * that's returned when the `getEntities` or `getEntitiesByType` method is called on the active item. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Read + */ + export interface TaskSuggestion { + /** + * Gets the users that should be assigned a suggested task. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + assignees: EmailUser[]; + /** + * Gets the text of an item that was identified as a task suggestion. + * + * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * @deprecated Use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | regular expression rules} instead. + */ + taskString: string; + } + /** + * The `Time` object is returned as the start or end property of an appointment in compose mode. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + */ + export interface Time { + /** + * Gets the start or end time of an appointment. + * + * The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated Universal Time (UTC). + * You can convert the UTC time to the local client time by using the `convertToLocalClientTime` method. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. + */ + getAsync(options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Gets the start or end time of an appointment. + * + * The date and time is provided as a `Date` object in the `asyncResult.value` property. The value is in Coordinated Universal Time (UTC). + * You can convert the UTC time to the local client time by using the `convertToLocalClientTime` method. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter + * of type `Office.AsyncResult`. The `value` property of the result is a `Date` object. + */ + getAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the start or end time of an appointment. + * + * If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the duration of the appointment as + * previously set. If the `setAsync` method is called on the `end` property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before the appointment start time. + * + * @param dateTime - A date-time object in Coordinated Universal Time (UTC). + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + /** + * Sets the start or end time of an appointment. + * + * If the `setAsync` method is called on the start property, the `end` property will be adjusted to maintain the duration of the appointment as + * previously set. If the `setAsync` method is called on the `end` property, the duration of the appointment will be extended to the new end time. + * + * The time must be in UTC; you can get the correct UTC time by using the `convertToUtcClientTime` method. + * + * **Important**: In the Windows client, you can't use this method to update the start or end of a recurrence. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Errors**: + * + * - `InvalidEndTime`: The appointment end time is before the appointment start time. + * + * @param dateTime - A date-time object in Coordinated Universal Time (UTC). + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If setting the date and time fails, the `asyncResult.error` property will contain an error code. + */ + setAsync(dateTime: Date, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; + } + /** + * Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + export interface UserProfile { + /** + * Gets the account type of the user associated with the mailbox. + * + * **Note**: This member is currently only supported in Outlook on Mac starting in Version 16.9 (17121200). + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + * + * The possible account types are listed in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    ValueDescription
    enterpriseThe mailbox is on an on-premises Exchange server.
    gmailThe mailbox is associated with a Gmail account.
    office365The mailbox is associated with a Microsoft 365 work or school account.
    outlookComThe mailbox is associated with a personal Outlook.com account.
    + * + * **Note**: For hybrid Exchange environments, the returned account type value depends on where the mailbox is hosted. + * If the mailbox is on an on-premises server, the account type value is **enterprise**. However, if it's hosted on + * Exchange Online, the account type value is **office365**. + */ + accountType: string; + /** + * Gets the user's display name. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + displayName: string; + /** + * Gets the user's SMTP email address. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + emailAddress: string; + /** + * Gets the user's time zone in Windows format. + * + * The system time zone is usually returned. However, in Outlook on the web and in {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}), + * the default time zone in the calendar preferences is returned instead. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose or Read + */ + timeZone: string; + } +} + + +//////////////////////////////////////////////////////////////// +/////////////////////// End Exchange APIs ////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/package.json b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/package.json new file mode 100644 index 0000000000..1a7aac4f97 --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/package.json @@ -0,0 +1,4 @@ +{ + "name": "outlook", + "version": "1.15.0" +} \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsconfig.json b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsconfig.json new file mode 100644 index 0000000000..0820319fc2 --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "es6", + "forceConsistentCasingInFileNames": true, + "module": "commonjs", + "declaration": true, + "sourceMap": true, + "experimentalDecorators": true, + "types": [ + "node" + ], + "lib": [ + "es5", + "scripthost", + "es2015.collection", + "es2015.promise", + "es2015.iterable", + "dom" + ] + }, + "include": [ "outlook.d.ts" ] +} diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsdoc-metadata.json b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsdoc-metadata.json new file mode 100644 index 0000000000..03ce231904 --- /dev/null +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_15/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "7.43.0" + } + ] +} diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts index 614490bab3..8f41124567 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_2/Outlook.d.ts @@ -2340,6 +2340,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -2903,6 +2905,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts index 4633836f22..d2dc78d850 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_3/Outlook.d.ts @@ -2666,6 +2666,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -3280,6 +3282,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts index b31409a29b..18e33fb9f4 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_4/Outlook.d.ts @@ -2666,6 +2666,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -3280,6 +3282,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts index b1b15ccd0d..ebf591505f 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_5/Outlook.d.ts @@ -2666,6 +2666,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -3449,6 +3451,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts index 1870f4f388..5b620b295b 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_6/Outlook.d.ts @@ -2719,6 +2719,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -3548,6 +3550,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts index 9ef73d10c0..bf6822d8ce 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_7/Outlook.d.ts @@ -3782,6 +3782,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -4611,6 +4613,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts index 3219010a05..7f41936f53 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_8/outlook.d.ts @@ -5089,6 +5089,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -5974,6 +5976,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts index 1e81ef6800..655324b65b 100644 --- a/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook-release/Outlook_1_9/outlook.d.ts @@ -5296,6 +5296,8 @@ export declare namespace Office { */ export interface ItemRead extends Item { } + + /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -6459,6 +6461,8 @@ export declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: CommonAPI.AsyncResult) => void, userContext?: any): void; + + /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * diff --git a/generate-docs/api-extractor-inputs-outlook/outlook.d.ts b/generate-docs/api-extractor-inputs-outlook/outlook.d.ts index c0709a11d3..eb48398d46 100644 --- a/generate-docs/api-extractor-inputs-outlook/outlook.d.ts +++ b/generate-docs/api-extractor-inputs-outlook/outlook.d.ts @@ -6192,7 +6192,7 @@ export declare namespace Office { * A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -6206,8 +6206,6 @@ export declare namespace Office { * * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. * This must be done before calling `loadItemByIdAsync` on another item. - * - * @beta */ export interface LoadedMessageCompose { /** @@ -6365,9 +6363,7 @@ export declare namespace Office { * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * - * **Important**: - * - * - Only the `getAllAsync` method of the NotificationMessages object is supported. + * **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. */ notificationMessages: NotificationMessages; /** @@ -7059,7 +7055,7 @@ export declare namespace Office { * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -7076,15 +7072,13 @@ export declare namespace Office { * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; /** * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -7100,8 +7094,6 @@ export declare namespace Office { * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; } @@ -7110,7 +7102,7 @@ export declare namespace Office { * A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -7124,8 +7116,6 @@ export declare namespace Office { * * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. * This must be done before calling `loadItemByIdAsync` on another item. - * - * @beta */ export interface LoadedMessageRead { /** @@ -7953,7 +7943,7 @@ export declare namespace Office { * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -7970,15 +7960,13 @@ export declare namespace Office { * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(options: CommonAPI.AsyncContextOptions, callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; /** * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -7994,8 +7982,6 @@ export declare namespace Office { * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(callback?: (asyncResult: CommonAPI.AsyncResult) => void): void; } @@ -9208,12 +9194,12 @@ export declare namespace Office { * Then, gets an object that provides the properties and methods of the loaded item. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read - * + * * **Important**: * * - This method only applies to messages. @@ -9235,8 +9221,6 @@ export declare namespace Office { * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. - * - * @beta */ loadItemByIdAsync(itemId: string, options: CommonAPI.AsyncContextOptions, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; /** @@ -9244,12 +9228,12 @@ export declare namespace Office { * Then, gets an object that provides the properties and methods of the loaded item. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read - * + * * **Important**: * * - This method only applies to messages. @@ -9269,8 +9253,6 @@ export declare namespace Office { * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. - * - * @beta */ loadItemByIdAsync(itemId: string, callback: (asyncResult: CommonAPI.AsyncResult) => void): void; /** @@ -14502,7 +14484,7 @@ export declare namespace Office { * * @remarks * - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * @@ -14517,8 +14499,6 @@ export declare namespace Office { * * - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property. * This ensures that the message is displayed properly in Outlook clients that don't support Markdown. - * - * @beta */ errorMessageMarkdown?: string; /** diff --git a/generate-docs/script-inputs/office.d.ts b/generate-docs/script-inputs/office.d.ts index ebd78009d9..ba77c115b2 100644 --- a/generate-docs/script-inputs/office.d.ts +++ b/generate-docs/script-inputs/office.d.ts @@ -10225,7 +10225,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Child interfaces: * @@ -10240,7 +10240,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * @@ -10674,7 +10674,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -10696,7 +10696,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -11262,7 +11262,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -11282,7 +11282,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -11620,7 +11620,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Parent interfaces: * @@ -11938,7 +11938,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -11960,7 +11960,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -12496,7 +12496,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -12516,7 +12516,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -14598,7 +14598,7 @@ declare namespace Office { * You can determine the type of the item by using the `itemType` property. * * To see the full member list, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following: * @@ -14623,7 +14623,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Child interfaces: * @@ -14638,7 +14638,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Child interfaces: * @@ -14648,6 +14648,1804 @@ declare namespace Office { */ interface ItemRead extends Item { } + /** + * Represents a message in compose mode that's currently loaded. + * A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * determine if you can already access the required properties of the selected item through the + * `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + */ + interface LoadedMessageCompose { + /** + * Gets the recipients on the **Bcc** (blind carbon copy) line of a message. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + bcc: Recipients; + /** + * Gets the item's body and format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + */ + body: Body; + /** + * Gets an object that provides methods to manage the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + categories: Categories; + /** + * Gets recipients on the **Cc** (carbon copy) line of a message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + cc: Recipients; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * You get null for this property for a new item in a compose form. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + conversationId: string; + /** + * Gets the delayed delivery date and time of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the DelayDeliveryTime object is supported. + */ + delayDeliveryTime: DelayDeliveryTime; + /** + * Gets the email address of the sender of a message. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + from: From; + /** + * Gets the message ID of the original message being replied to by the current message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on Windows, the `inReplyTo` value is maintained on all replies regardless of changes made by the user, such as changing the subject in a reply. + * + * - The `inReplyTo` property returns `null` for new messages and meeting invites being forwarded by a user who's also the meeting organizer. + */ + inReplyTo: string; + /** + * Gets the custom internet headers of a message. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the InternetHeaders object is supported. + */ + internetHeaders: InternetHeaders; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the notification messages of the item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. + */ + notificationMessages: NotificationMessages; + /** + * Gets the sensitivity label of a message. + * + * @remarks + * [Api set: Mailbox 1.13] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To use the sensitivity label feature in your add-in, you must have a Microsoft 365 E5 subscription. + * + * - Only the `getAsync` method of the SensitivityLabel object is supported. + * + * To learn more about how to manage sensitivity labels in your add-in, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/sensitivity-label | Manage the sensitivity label of your message or appointment in compose mode}. + */ + sensitivityLabel: SensitivityLabel; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + */ + seriesId: string; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets the entire subject of the item, as sent by the email server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: Only the `getAsync` method of the Subject object is supported. + */ + subject: Subject; + /** + * Gets the recipients on the **To** line of a message. + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - Only the `getAsync` method of the Recipients object is supported. + * + * - Depending on the Outlook client and platform, limits may apply on how many recipients you can get. + * For more information, see the {@link Office.Recipients | Recipients} object. + */ + to: Recipients; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from a `getAttachmentsAsync` call, then in the same session, use that identifier to retrieve the attachment. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an inline form + * then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the item's attachments as an array. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. If the call fails, the `asyncResult.error` property will contain an error code with the reason for + * the failure. + */ + getAttachmentsAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Specifies the type of message compose and its coercion type. The message can be new, or a reply or forward. + * The coercion type can be HTML or plain text. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. On success, the `asyncResult.value` property contains an object with the item's compose type + * and coercion type. + * + * @returns + * An object with `ComposeType` and `CoercionType` enum values for the message item. + */ + getComposeTypeAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the Base64-encoded position of the current message in a conversation thread. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Tip**: You can use the conversation index to locate a message in a conversation thread. Then, use its contents + * to provide context for the current message being composed. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded position of the current message in a conversation is returned in the `asyncResult.value` + * property. + */ + getConversationIndexAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * The following table lists the default message classes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The message class is returned in the `asyncResult.value` property. + */ + getItemClassAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier} + * of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the `itemId` isn't recognized and using it returns an error. + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. The EWS item ID of the item is returned in the `asyncResult.value` property. + */ + getItemIdAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously gets the ID of a saved item. + * + * When invoked, this method returns the item ID via the callback function. + * + * **Note**: If your add-in calls `getItemIdAsync` on an item in compose mode (for example, to get an `itemId` to use with EWS or the REST API), + * be aware that when Outlook is in cached mode, it may take some time before the item is synced to the server. + * Until the item is synced, the `itemId` isn't recognized and using it returns an error. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Errors**: + * + * - `ItemNotSaved`: The ID can't be retrieved until the item is saved. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + */ + getItemIdAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to classic Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: In Message Compose mode, this API isn't supported in Outlook on the web or on Windows + * ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic) unless the following conditions are met. + * + * a. **Delegate access/Shared folders** + * + * 1. The mailbox owner starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder shared with the delegate. + * + * 3. The delegate opens the draft from the shared folder then continues composing. + * + * b. **Shared mailbox (applies to Outlook on Windows only)** + * + * 1. The shared mailbox user starts a message. This can be a new message, a reply, or a forward. + * + * 2. They save the message then move it from their own **Drafts** folder to a folder in the shared mailbox. + * + * 3. Another shared mailbox user opens the draft from the shared mailbox then continues composing. + * + * The message is now in a shared context and add-ins that support these shared scenarios can get the item's shared properties. + * After the message has been sent, it's usually found in the sender's **Sent Items** folder. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets if the client signature is enabled. + * + * In Outlook on Windows (classic), the API call returns `true` if the default signature for new messages, replies, or forwards is set + * to a template for the sending Outlook account. + * In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the API call returns `true` if the signature is enabled for compose types `newMail`, `reply`, or `forward`. + * If the settings are set to "(none)" in Outlook on Windows (classic) or are disabled in Outlook on the web or new Outlook on Windows, + * the API call returns `false`. + * + * @remarks + * [Api set: Mailbox 1.10] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + */ + isClientSignatureEnabledAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously saves the current message as a draft. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - In Outlook on the web, {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, or classic Outlook on Windows + * in online mode (non-cached mode), the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + * + * - When working with HTML-formatted content, it's important to note that the Outlook client may modify the content. This means that + * subsequent calls to methods like `Body.getAsync`, `Body.setAsync`, and even `saveAsync` may not result in the same content. + * + * - The identifier returned is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services (EWS) item identifier}. + * The item ID returned isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * + * - If your add-in calls `saveAsync` on an item in compose mode in order to get an item ID to use with EWS or the REST API, be aware that + * when Outlook is in cached mode, it may take some time before the item is actually synced to the server. + * Until the item is synced, using the item ID will return an error. + * + * - In Outlook on the web and new Outlook on Windows, the mailbox account to which a draft is saved varies when `saveAsync` is called on a message that will be sent + * from a shared mailbox account. If the sender creates a new message from their personal mailbox and selects the shared mailbox account + * in the **From** field, `saveAsync` saves the draft to the **Drafts** folder of the user's personal mailbox. If the sender opens the + * shared mailbox account in a separate browser tab (through the **Open another mailbox** option, for example) and creates a new message + * there, `saveAsync` saves the draft to the **Drafts** folder of the shared mailbox. + * + * **Errors**: + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. The EWS message ID is returned in the `asyncResult.value` property. + */ + saveAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + } + /** + * Represents a message in read mode that's currently loaded. + * A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * determine if you can already access the required properties of the selected item through the + * `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + */ + interface LoadedMessageRead { + /** + * Gets the item's attachments as an array. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Note**: Certain types of files are blocked by Outlook due to potential security issues and are therefore not returned. + * For more information, see + * {@link https://support.microsoft.com/office/434752e1-02d3-4e90-9124-8b81e49a8519 | Blocked attachments in Outlook}. + * + */ + attachments: AttachmentDetails[]; + /** + * Gets the item's body and its format. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: Only the `getAsync` and `getTypeAsync` methods of the Body object are supported. + */ + body: Body; + /** + * Gets an object that provides methods to manage the item's categories. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + categories: Categories; + /** + * Gets recipients on the **Cc** (carbon copy) line of a message. + * + * The `cc` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **Cc** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + cc: EmailAddressDetails[]; + /** + * Gets an identifier for the email conversation that contains a particular message. + * + * You can get an integer for this property if your mail app is activated in read forms or responses in compose forms. + * If subsequently the user changes the subject of the reply message, upon sending the reply, the conversation ID for that message will change + * and that value you obtained earlier will no longer apply. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + conversationId: string; + /** + * Gets the date and time that an item was created. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + dateTimeCreated: Date; + /** + * Gets the date and time that an item was last modified. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: This property isn't supported in Outlook on Android or on iOS. For more information on supported APIs in Outlook mobile, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-mobile-apis | Outlook JavaScript APIs supported in Outlook on mobile devices}. + */ + dateTimeModified: Date; + /** + * Gets the date and time that the appointment is to end. + * + * The `end` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the `end` property value to the client's local date and time. + * + * When you use the `Time.setAsync` method to set the end time, you should use the `convertToUtcClientTime` method to convert the local time on + * the client to UTC for the server. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + end: Date; + /** + * Gets the email address of the sender of a message. + * + * The `from` property returns an `EmailAddressDetails` object. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined. + */ + from: EmailAddressDetails; + /** + * Gets the internet message identifier of a message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case, + * consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this + * {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}. + */ + internetMessageId: string; + /** + * Gets the Exchange Web Services item class of the selected message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * The following table lists the default item classes for messages. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Item classDescription
    IPM.NoteNew messages and message replies
    IPM.Note.SMIMEEncrypted messages that can also be signed
    IPM.Note.SMIME.MultipartSignedClear-signed messages
    IPM.Schedule.Meeting.RequestMeeting requests
    IPM.Schedule.Meeting.CanceledMeeting cancellations
    IPM.Schedule.Meeting.Resp.NegResponses to decline meeting requests
    IPM.Schedule.Meeting.Resp.PosResponses to accept meeting requests
    IPM.Schedule.Meeting.Resp.TentResponses to tentatively accept meeting requests
    + * + * You can create custom classes that extend a default item class. For example, `IPM.Note.Contoso`. + */ + itemClass: string; + /** + * Gets the {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier} + * for the current item. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `itemId` property isn't available in compose mode. + * If an item identifier is required, the `Office.context.mailbox.item.saveAsync` method can be used to save the item to the store, which will return the item identifier + * in the `asyncResult.value` parameter in the callback function. If the item is already saved, you can call the `Office.context.mailbox.item.getItemIdAsync` method instead. + * + * - The identifier returned by the `itemId` property is the same as the + * {@link https://learn.microsoft.com/exchange/client-developer/exchange-web-services/ews-identifiers-in-exchange | Exchange Web Services item identifier}. + * The `itemId` property isn't identical to the Outlook Entry ID or the ID used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + */ + itemId: string; + /** + * Gets the type of item that an instance represents. + * + * The `itemType` property returns one of the `ItemType` enumeration values, indicating whether the item object instance is a message or + * an appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + itemType: MailboxEnums.ItemType | string; + /** + * Gets the location of a meeting request. + * + * The `location` property returns a string that contains the location of the appointment. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + location: string; + /** + * Gets the subject of an item, with all prefixes removed (including RE: and FWD:). + * + * The `normalizedSubject` property gets the subject of the item, with any standard prefixes (such as RE: and FW:) that are added by + * email programs. To get the subject of the item with the prefixes intact, use the `subject` property. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + normalizedSubject: string; + /** + * Gets the notification messages of the item. + * + * @remarks + * [Api set: Mailbox 1.3] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Only the `getAllAsync` method of the NotificationMessages object is supported. + */ + notificationMessages: NotificationMessages; + /** + * Gets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. + * Read and compose modes for appointment items. Read mode for meeting request items. + * + * The `recurrence` property returns a `Recurrence` object for recurring appointments or meetings requests if an item is a series or an instance + * in a series. `null` is returned for single appointments and meeting requests of single appointments. + * `undefined` is returned for messages that aren't meeting requests. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Meeting requests have an itemClass value of `IPM.Schedule.Meeting.Request`. + * + * - If the `recurrence` object is null, this indicates that the object is a single appointment or a meeting request of a single appointment + * and *not* a part of a series. + * + * - Only the propeties and the `getAsync` method of the Recurrence object are supported. + */ + recurrence: Recurrence; + /** + * Gets the ID of the series that an instance belongs to. + * + * In Outlook on the web and on Windows ({@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new} and classic), + * the `seriesId` returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. + * + * @remarks + * [Api set: Mailbox 1.7] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The identifier returned by the `seriesId` property is the same as the Exchange Web Services item identifier. + * The `seriesId` property isn't identical to the Outlook IDs used by the Outlook REST API. + * Before making REST API calls using this value, it should be converted using `Office.context.mailbox.convertToRestId`. + * For more details, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/use-rest-api | Use the Outlook REST APIs from an Outlook add-in}. + * + * - The `seriesId` property returns `null` for items that don't have parent items such as single appointments, series items, or meeting requests + * and returns `undefined` for any other items that aren't meeting requests. + */ + seriesId: string; + /** + * Gets the email address of the sender of an email message. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - The `from` and `sender` properties represent the same person unless the message is sent by a delegate. + * In that case, the `from` property represents the delegator, and the `sender` property represents the delegate. + * + * - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined. + */ + sender: EmailAddressDetails; + /** + * Gets the date and time that the appointment is to begin. + * + * The `start` property is a `Date` object expressed as a Coordinated Universal Time (UTC) date and time value. + * You can use the `convertToLocalClientTime` method to convert the value to the client's local date and time. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + start: Date; + /** + * Gets the description that appears in the subject field of an item. + * + * The `subject` property gets the entire subject of the item, as sent by the email server. + * + * The `subject` property returns a string. Use the `normalizedSubject` property to get the subject minus any leading prefixes such as RE: and FW:. + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + subject: string; + /** + * Gets the recipients on the **To** line of a message. + * Provides access to the recipients on the **To** line of a message. The type of object and level of access depend on the mode of the + * current item. + * + * The `to` property returns an array that contains an {@link Office.EmailAddressDetails | EmailAddressDetails} object for + * each recipient listed on the **To** line of the message. The maximum number of recipients returned varies per Outlook client. + * + * - classic Windows: 500 recipients + * + * - Web browser, new Outlook: 20 recipients (collapsed view), 500 recipients (expanded view) + * + * @remarks + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + */ + to: EmailAddressDetails[]; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes either the sender and all recipients of the selected message or the organizer and all attendees of the + * selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyAllFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyAllFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. + * + * @remarks + * [Api set: Mailbox 1.9] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2-column or 1-column view. + * + * - If any of the string parameters exceed their limits, `displayReplyFormAsync` throws an exception. + * + * - When attachments are specified in the `formData.attachments` parameter, Outlook attempts to download all attachments and attach them to the + * reply form. If any attachments fail to be added, an error is shown in the form UI. If this isn't possible, then no error message is thrown. + * + * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + */ + displayReplyFormAsync(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets all the internet headers for the message as a string. + * + * To learn more, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/internet-headers | Get and set internet headers on a message in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. + * On success, the internet headers data is provided in the `asyncResult.value` property as a string. + * Refer to {@link https://tools.ietf.org/html/rfc2183 | RFC 2183} for the formatting information of the returned string value. + * If the call fails, the `asyncResult.error` property will contain an error code with the reason for the failure. + */ + getAllInternetHeadersAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the current message in EML format encoded in Base64. + * + * @remarks + * [Api set: Mailbox 1.14] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The Base64-encoded EML format of the message is returned in the `asyncResult.value` property. Any errors encountered are + * returned in the `asyncResult.error` property. + */ + getAsFileAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. + * + * The `getAttachmentContentAsync` method gets the attachment with the specified identifier from the item. As a best practice, you should get + * the attachment's identifier from an {@link Office.MessageRead.attachments | item.attachments} call, then in the same session, use that identifier + * to retrieve the attachment. In Outlook on the web and {@link https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627 | new Outlook on Windows}, + * the attachment identifier is valid only within the same session. A session is over when the user closes the app, or if the user starts composing an + * inline form then subsequently pops out the form to continue in a separate window. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Errors**: + * + * - `AttachmentTypeNotSupported`: The attachment type isn't supported. Unsupported types include embedded images in Rich Text Format, + * or item attachment types other than email or calendar items (such as a contact or task item). + * + * - `InvalidAttachmentId`: The attachment identifier does not exist. + * + * @param attachmentId - The identifier of the attachment you want to get. + * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. If the call fails, the `asyncResult.error` property will contain + * an error code with the reason for the failure. + */ + getAttachmentContentAsync(attachmentId: string, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets initialization data passed when the add-in is {@link https://learn.microsoft.com/outlook/actionable-messages/invoke-add-in | activated by an actionable message}. + * + * @remarks + * [Api set: Mailbox 1.8] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter + * of type `Office.AsyncResult`. + * On success, the initialization context data is provided as a string (or an empty string if there's no initialization context) + * in the `asyncResult.value` property. + */ + getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Returns string values in the selected item that match the regular expressions defined in an XML manifest file. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule + * or the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property + * of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getRegExMatches(): any; + /** + * Returns string values in the selected item that match the named regular expression defined in an XML manifest file. + * + * @returns + * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file, + * with the specified `RegExName` element value. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as `.*` to obtain the entire body of an item doesn't always return the expected results. + * Instead, use the `Body.getAsync` method to retrieve the entire body. + * + * @param name - The name of the `ItemHasRegularExpressionMatch` rule element that defines the filter to match. + */ + getRegExMatchesByName(name: string): string[]; + /** + * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file. + * Highlighted matches apply to contextual add-ins. + * + * @returns + * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file. + * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule or + * the `FilterName` attribute of the matching `ItemHasKnownEntity` rule. For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur + * in the property of the item that is specified by that rule. The `PropertyName` simple type defines the supported properties. + * + * @remarks + * [Api set: Mailbox 1.6] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: + * + * - Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported. + * We recommend updating your contextual add-in to use regular expression rules as an alternative solution. + * For guidance on how to implement these rules, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/contextual-outlook-add-ins | Contextual Outlook add-ins}. + * + * - This method is used with the {@link https://learn.microsoft.com/javascript/api/manifest/rule | activation rules feature for Outlook add-ins}, + * which isn't supported by the {@link https://learn.microsoft.com/office/dev/add-ins/develop/json-manifest-overview | unified manifest for Microsoft 365}. + * + * - If you specify an `ItemHasRegularExpressionMatch` rule on the body property of an item, the regular expression should further filter the body + * and shouldn't attempt to return the entire body of the item. Using a regular expression such as .* to obtain the entire body of an item doesn't always return the + * expected results. Instead, use the `Body.getAsync` method to retrieve the entire body. + */ + getSelectedRegExMatches(): any; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param options - An object literal that contains one or more of the following properties:- + * `asyncContext`: Developers can provide any object they wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Gets the properties of an appointment or message in a shared folder or shared mailbox. + * + * For more information around using this API, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/delegate-access | Enable shared folders and shared mailbox scenarios in an Outlook add-in}. + * + * @remarks + * [Api set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, `asyncResult`, which is an + * `Office.AsyncResult` object. The `asyncResult.value` property provides the properties of the shared item. + */ + getSharedPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Asynchronously loads custom properties for this add-in on the selected item. + * + * Custom properties are stored as key-value pairs on a per-app, per-item basis. + * This method returns a {@link Office.CustomProperties | CustomProperties} object in the callback, which provides methods to access the custom properties specific to the + * current item and the current add-in. Custom properties aren't encrypted on the item, so this shouldn't be used as secure storage. + * + * The custom properties are provided as a `CustomProperties` object in the `asyncResult.value` property. + * This object can be used to get custom properties from the mail item. + * + * @remarks + * [Api set: Mailbox 1.1] + * + * To learn more about custom properties, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/metadata-for-an-outlook-add-in | Get and set add-in metadata for an Outlook add-in}. + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read + * + * **Important**: Only the `get` and `getAll` methods of the CustomProperties object are supported. + * + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter of + * type `Office.AsyncResult`. + * @param userContext - Optional. Developers can provide any object they wish to access in the callback function. + * This object can be accessed by the `asyncResult.asyncContext` property in the callback function. + */ + loadCustomPropertiesAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; + /** + * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose + * + * **Important**: + * + * - To learn more about processing multiple selected messages, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}. + * + * - When a selected mail item is loaded using `loadItemByIdAsync`, you must call `unloadAsync` after processing on it. This must be done before + * calling `loadItemByIdAsync` on another selected item. + * + * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, + * which is an `Office.AsyncResult` object. + */ + unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; + } /** * Represents a date and time in the local client's time zone. Read mode only. * @@ -14975,7 +16773,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] @@ -14996,7 +16794,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] @@ -15853,6 +17651,72 @@ declare namespace Office { * @param userContext - Optional. Any state data that is passed to the asynchronous method. */ getUserIdentityTokenAsync(callback: (asyncResult: Office.AsyncResult) => void, userContext?: any): void; + /** + * Loads a single mail item by its Exchange Web Services (EWS) ID. + * Then, gets an object that provides the properties and methods of the loaded item. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: + * + * - This method only applies to messages. + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * call `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be loaded one at a time. + * + * - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can already access the required properties of the + * selected item using the `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + * + * - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + * + * @param itemId - The EWS ID of a selected item. + * @param options - An object literal that contains the `asyncContext` property. + * In this property, provide any object you wish to access in the callback function. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned + * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. + */ + loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; + /** + * Loads a single mail item by its Exchange Web Services (EWS) ID. + * Then, gets an object that provides the properties and methods of the loaded item. + * + * @remarks + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read + * + * **Important**: + * + * - This method only applies to messages. + * + * - When implementing the {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | item multi-select feature}, + * call `Office.context.mailbox.getSelectedItemsAsync` to get the item IDs of each selected item, so that they can be loaded one at a time. + * + * - Before you implement the `loadItemByIdAsync` method with the item multi-select feature, determine if you can already access the required properties of the + * selected item using the `Office.context.mailbox.getSelectedItemsAsync` call. If you can, you don't need to call `loadItemByIdAsync`. + * + * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. + * This must be done before calling `loadItemByIdAsync` on another item. + * + * - The `loadItemByIdAsync` method can only be called on messages in the same mailbox. + * + * @param itemId - The EWS ID of a selected item. + * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, + * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned + * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. + */ + loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult) => void): void; /** * Makes an asynchronous request to an Exchange Web Services (EWS) service on the Exchange server that hosts the user's mailbox. * @@ -15908,7 +17772,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] @@ -15927,7 +17791,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Mailbox object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox#events | events section}. * * @remarks * [Api set: Mailbox 1.5] @@ -16205,7 +18069,7 @@ declare namespace Office { * * **Important**: This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * Child interfaces: * @@ -16222,7 +18086,7 @@ declare namespace Office { * * - This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be turned on. * For guidance on how to configure the Reading Pane, see @@ -16660,7 +18524,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -16682,7 +18546,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -17573,7 +19437,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -17593,7 +19457,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -17757,7 +19621,7 @@ declare namespace Office { * * - This is an internal Outlook object, not directly exposed through existing interfaces. * You should treat this as a mode of `Office.context.mailbox.item`. For more information, refer to the - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item | Object Model} page. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item | Object Model} page. * * - When calling `Office.context.mailbox.item` on a message, note that the Reading Pane in the Outlook client must be turned on. * For guidance on how to configure the Reading Pane, see @@ -18153,7 +20017,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -18175,7 +20039,7 @@ declare namespace Office { * Adds an event handler for a supported event. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -18798,7 +20662,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -18818,7 +20682,7 @@ declare namespace Office { * Removes the event handlers for a supported event type. **Note**: Events are only available with task pane implementation. * * For supported events, refer to the Item object model - * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.14/office.context.mailbox.item#events | events section}. + * {@link https://learn.microsoft.com/javascript/api/requirement-sets/outlook/requirement-set-1.15/office.context.mailbox.item#events | events section}. * * @remarks * [Api set: Mailbox 1.7] @@ -20916,6 +22780,30 @@ declare namespace Office { * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose */ errorMessage?: string; + /** + * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler + * and set its `allowEvent` property to `false`, this property sets the error message displayed to the user. The error message is formatted using Markdown. For an example, see the + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/smart-alerts-onmessagesend-walkthrough | Smart Alerts walkthrough}. + * + * @remarks + * + * [Api set: Mailbox 1.15] + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** + * + * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose + * + * **Important** + * + * - The formatted error message must be 500 characters or less. + * + * - For guidance on supported Markdown elements, see + * {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events#limitations-to-formatting-the-dialog-message-using-markdown | Limitations to formatting the dialog message using Markdown}. + * + * - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property. + * This ensures that the message is displayed properly in Outlook clients that don't support Markdown. + */ + errorMessageMarkdown?: string; /** * When you use the {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxevent#outlook-office-mailboxevent-completed-member(1) | completed method} to signal completion of an event handler * and set its `allowEvent` property to `false`, this property overrides the diff --git a/generate-docs/script-inputs/office_preview.d.ts b/generate-docs/script-inputs/office_preview.d.ts index 9b015aa610..95dcb6bf86 100644 --- a/generate-docs/script-inputs/office_preview.d.ts +++ b/generate-docs/script-inputs/office_preview.d.ts @@ -14982,7 +14982,7 @@ declare namespace Office { * A `LoadedMessageCompose` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in compose mode. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -14996,8 +14996,6 @@ declare namespace Office { * * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. * This must be done before calling `loadItemByIdAsync` on another item. - * - * @beta */ interface LoadedMessageCompose { /** @@ -15155,9 +15153,7 @@ declare namespace Office { * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose * - * **Important**: - * - * - Only the `getAllAsync` method of the NotificationMessages object is supported. + * **Important**: Only the `getAllAsync` method of the NotificationMessages object is supported. */ notificationMessages: NotificationMessages; /** @@ -15849,7 +15845,7 @@ declare namespace Office { * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -15866,15 +15862,13 @@ declare namespace Office { * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -15890,8 +15884,6 @@ declare namespace Office { * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; } @@ -15900,7 +15892,7 @@ declare namespace Office { * A `LoadedMessageRead` object is returned when `Office.context.mailbox.loadItemByIdAsync` is called on a message in read mode. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -15914,8 +15906,6 @@ declare namespace Office { * * - Only one mail item can be loaded at a time. When you implement `loadItemByIdAsync`, you must call `unloadAsync` after processing the item. * This must be done before calling `loadItemByIdAsync` on another item. - * - * @beta */ interface LoadedMessageRead { /** @@ -16743,7 +16733,7 @@ declare namespace Office { * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -16760,15 +16750,13 @@ declare namespace Office { * @param options - An object literal that contains the `asyncContext` property. Assign any object you wish to access in the callback function to the `asyncContext` property. * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult) => void): void; /** * When multiple mail items are selected, closes the currently loaded item, so that another selected mail item can be loaded for processing. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * @@ -16784,8 +16772,6 @@ declare namespace Office { * * @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter, `asyncResult`, * which is an `Office.AsyncResult` object. - * - * @beta */ unloadAsync(callback?: (asyncResult: Office.AsyncResult) => void): void; } @@ -17998,12 +17984,12 @@ declare namespace Office { * Then, gets an object that provides the properties and methods of the loaded item. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read - * + * * **Important**: * * - This method only applies to messages. @@ -18025,8 +18011,6 @@ declare namespace Office { * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. - * - * @beta */ loadItemByIdAsync(itemId: string, options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult) => void): void; /** @@ -18034,12 +18018,12 @@ declare namespace Office { * Then, gets an object that provides the properties and methods of the loaded item. * * @remarks - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write item** * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose, Read - * + * * **Important**: * * - This method only applies to messages. @@ -18059,8 +18043,6 @@ declare namespace Office { * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter, * `asyncResult`, which is an `Office.AsyncResult` object. A `LoadedMessageCompose` or `LoadedMessageRead` object is returned * in the `asyncResult.value` property. This object provides the properties of the selected item that's currently loaded. - * - * @beta */ loadItemByIdAsync(itemId: string, callback: (asyncResult: Office.AsyncResult) => void): void; /** @@ -23292,7 +23274,7 @@ declare namespace Office { * * @remarks * - * [Api set: Mailbox preview] + * [Api set: Mailbox 1.15] * * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level (Outlook)}**: **restricted** * @@ -23307,8 +23289,6 @@ declare namespace Office { * * - If you format the dialog message using the `errorMessageMarkdown` property, we recommend you also add a plaintext version of the message using the `errorMessage` property. * This ensures that the message is displayed properly in Outlook clients that don't support Markdown. - * - * @beta */ errorMessageMarkdown?: string; /** diff --git a/generate-docs/scripts/midprocessor.ts b/generate-docs/scripts/midprocessor.ts index fb568434b7..04eb4752ac 100644 --- a/generate-docs/scripts/midprocessor.ts +++ b/generate-docs/scripts/midprocessor.ts @@ -6,7 +6,7 @@ import * as colors from 'colors'; const CURRENT_EXCEL_RELEASE = 17; const OLDEST_EXCEL_RELEASE_WITH_CUSTOM_FUNCTIONS = 9; -const CURRENT_OUTLOOK_RELEASE = 14; +const CURRENT_OUTLOOK_RELEASE = 15; const CURRENT_WORD_RELEASE = 9; const CURRENT_POWERPOINT_RELEASE = 7; diff --git a/generate-docs/scripts/postprocessor.ts b/generate-docs/scripts/postprocessor.ts index 71dde6ea76..c3b80bd154 100644 --- a/generate-docs/scripts/postprocessor.ts +++ b/generate-docs/scripts/postprocessor.ts @@ -95,7 +95,7 @@ tryCatch(async () => { const tocWithReleaseCommon = scrubAndWriteToc(docsDestination + "/office_release", globalToc); const hostVersionMap = [{host: "excel", versions: 18}, /*not including online*/ {host: "onenote", versions: 1}, - {host: "outlook", versions: 15}, + {host: "outlook", versions: 16}, {host: "powerpoint", versions: 8}, {host: "visio", versions: 1}, {host: "word", versions: 10}]; /* not including online or desktop*/ diff --git a/generate-docs/scripts/preprocessor.ts b/generate-docs/scripts/preprocessor.ts index 58cd874e9d..5129de2d42 100644 --- a/generate-docs/scripts/preprocessor.ts +++ b/generate-docs/scripts/preprocessor.ts @@ -143,7 +143,7 @@ tryCatch(async () => { console.log("create file: outlook.d.ts (release)"); makeDtsAndClearJsonIfNew( - '../api-extractor-inputs-outlook-release/outlook_1_14/outlook.d.ts', + '../api-extractor-inputs-outlook-release/outlook_1_15/outlook.d.ts', handleCommonImports(dtsBuilder.extractDtsSection(releaseDefinitions, "Begin Exchange APIs", "End Exchange APIs"), "Outlook", true), "outlook", forceRebuild