Office.AppointmentTimeChangedEventArgs interface

Provides the current dates and times of the appointment that raised the Office.EventType.AppointmentTimeChanged event.

Remarks

[ API set: Mailbox 1.7 ]

Examples

// 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}`);
}

Properties

end

Gets the appointment end date and time.

start

Gets the appointment start date and time.

type

Gets the type of the event. For details, refer to Office.EventType.

Property Details

end

Gets the appointment end date and time.

end: Date;

Property Value

Date

Remarks

[ API set: Mailbox 1.7 ]

start

Gets the appointment start date and time.

start: Date;

Property Value

Date

Remarks

[ API set: Mailbox 1.7 ]

type

Gets the type of the event. For details, refer to Office.EventType.

type: "olkAppointmentTimeChanged";

Property Value

"olkAppointmentTimeChanged"

Remarks

[ API set: Mailbox 1.7 ]