Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Office.EnhancedLocationsChangedEventArgs interface

Package:
outlook

Provides the current enhanced locations when the Office.EventType.EnhancedLocationsChanged event is raised.

Remarks

API set: Mailbox 1.8

Examples

// 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.item.addHandlerAsync(Office.EventType.EnhancedLocationsChanged, enhancedLocationsChangedHandler, (result) => {
 if (result.status === Office.AsyncResultStatus.Failed) {
 console.error(`Failed to add event handler: ${result.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}`);
 }
 });
}

Properties

enhancedLocations

Gets the set of enhanced locations.

type

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

Property Details

enhancedLocations

Gets the set of enhanced locations.

enhancedLocations: LocationDetails[];

Property Value

Remarks

API set: Mailbox 1.8

type

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

type: "olkEnhancedLocationsChanged";

Property Value

"olkEnhancedLocationsChanged"

Remarks

API set: Mailbox 1.8


Feedback

Was this page helpful?