Office.EnhancedLocationsChangedEventArgs interface
Stellt die aktuellen erweiterten Speicherorte bereit, wenn das Office.EventType.EnhancedLocationsChanged
Ereignis ausgelöst wird.
Hinweise
Beispiele
// 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}`);
}
});
}
Eigenschaften
enhanced |
Ruft den Satz erweiterter Speicherorte ab. |
type | Ruft den Typ des Ereignisses ab. Weitere Informationen finden Sie unter Office.EventType. |
Details zur Eigenschaft
enhancedLocations
Ruft den Satz erweiterter Speicherorte ab.
enhancedLocations: LocationDetails[];
Eigenschaftswert
Hinweise
type
Ruft den Typ des Ereignisses ab. Weitere Informationen finden Sie unter Office.EventType.
type: "olkEnhancedLocationsChanged";
Eigenschaftswert
"olkEnhancedLocationsChanged"
Hinweise
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Office Add-ins