在网络界面中添加位置后调用EnhancedLocation.getAsync()时,将返回一个空列表

时间:2019-10-23 15:07:45

标签: office-js

自2019年4月22日起,EnhancedLocation已添加到Officejs预览中。 (https://docs.microsoft.com/en-us/javascript/api/outlook/office.enhancedlocation?view=office-js

在间隔内获得EnhancedLocation时:

setInterval(() => {
        Office.context.mailbox.item.enhancedLocation.getAsync((asyncResult) => {
            asyncResult.value.forEach(function (place) {
                console.log("Display name: " + place.displayName);
                console.log("Type: " + place.locationIdentifier.type);
                if (place.locationIdentifier.type === 
                    Office.MailboxEnums.LocationType.Room) {
                    console.log("Email address: " + place.emailAddress);
                }
            });
        });
    }, 5000);

设置位置(jhon@doe.nl)后: setting location

将返回一个空列表:

OSF.DDA.AsyncResult
status: "succeeded"
value: []
__proto__: Object

有人知道如何解决此问题吗?

0 个答案:

没有答案