Skip to content

Commit 14b4a02

Browse files
[Outlook] Map snippet to AppointmentForm interface (#1019)
1 parent e2c8bab commit 14b4a02

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
-14 Bytes
Binary file not shown.

snippet-extractor-output/snippets.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10113,6 +10113,38 @@ Office.AppointmentCompose#subject:member:
1011310113
}
1011410114
console.log(`Successfully set subject to ${subject}`);
1011510115
});
10116+
Office.AppointmentForm:interface:
10117+
- >-
10118+
// Link to full sample:
10119+
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/55-display-items/display-new-appointment.yaml
10120+
10121+
10122+
const start = new Date();
10123+
10124+
const end = new Date();
10125+
10126+
end.setHours(start.getHours() + 1);
10127+
10128+
10129+
// The async version is only available starting with requirement set 1.9,
10130+
10131+
// and provides a callback when the new appointment form has been created.
10132+
10133+
Office.context.mailbox.displayNewAppointmentFormAsync(
10134+
{
10135+
requiredAttendees: ["bob@contoso.com"],
10136+
optionalAttendees: ["sam@contoso.com"],
10137+
start: start,
10138+
end: end,
10139+
location: "Home",
10140+
subject: "meeting",
10141+
resources: ["projector@contoso.com"],
10142+
body: "Hello World!"
10143+
},
10144+
function(asyncResult) {
10145+
console.log(JSON.stringify(asyncResult));
10146+
}
10147+
);
1011610148
Office.AppointmentRead#attachments:member:
1011710149
- >-
1011810150
// Link to full sample:

0 commit comments

Comments
 (0)