Office.InitializationContextChangedEventArgs interface

Provides data from an actionable message, InsightMessage notification, Smart Alerts dialog, or integrated spam-reporting dialog when the Office.EventType.InitializationContextChanged event occurs.

Remarks

[ API set: Mailbox 1.15 ]

Examples

// This sample adds an event handler for the InitializationContextChanged event.
Office.context.mailbox.addHandlerAsync(Office.EventType.InitializationContextChanged, initializationContextChangedHandler, (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 InitializationContextChanged event.
function initializationContextChangedHandler(event) {
    console.log(`Event: ${event.type}`);
    const data = event.initializationContextData;
    console.log(`Data: ${data}`);
}

Properties

initializationContextData

Represents the data to be passed to an add-in's task pane from an actionable message, notification message, Smart Alerts dialog, or integrated spam-reporting dialog.

type

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

Property Details

initializationContextData

Represents the data to be passed to an add-in's task pane from an actionable message, notification message, Smart Alerts dialog, or integrated spam-reporting dialog.

initializationContextData: string;

Property Value

string

Remarks

[ API set: Mailbox 1.15 ]

type

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

type: "olkInitializationContextChanged";

Property Value

"olkInitializationContextChanged"

Remarks

[ API set: Mailbox 1.15 ]