Office365 如何检测office 365中的环境?
我有一个带有javascript api的outlook插件,我想从我的网站重定向到应用程序的正确环境Office365 如何检测office 365中的环境?,office365,office-js,Office365,Office Js,我有一个带有javascript api的outlook插件,我想从我的网站重定向到应用程序的正确环境 var isSetSupported = function(Application, version) { return window["Office"] && Office.context.requirements && Office.context.requirements.isSetSupported(Application
var isSetSupported = function(Application, version) {
return window["Office"] && Office.context.requirements && Office.context.requirements.isSetSupported(Application + 'Api', version);
};
//heck to return the powerpoint library because isSetSupported returns false for PowerpointApi 1.0| 1.1| 1.2 returns false
var isPowerpointEnviroment = function() {
return window.location.search.indexOf('_host_Info=Powerpoint') != -1;
}
//heck to return the outlook library because isSetSupported returns false for OutlookApi 1.0| 1.1| 1.2 returns false
var isOutlookEnviroment = function () {
return window.location.search.indexOf('_host_Info=Outlook') != -1 || ( window.external && window.external.GetContext && typeof window.external.GetContext() == 'object');
}
if (isSetSupported("Word", 1.1)) {
return "wordJs";
}
if (isSetSupported("Excel", 1.1)) {
return "excelJs";
}
if (isOutlookEnviroment()) {
return "outlookJs";
}
if (isPowerpointEnviroment()) {
return "powerpointJs";
}
return "webApp";
在本地计算机的outlook上,它是这样工作的,但对于office365 outlook,它不工作 什么是“Office.context.requirements”?它的回报是什么?它甚至没有作为Office.context:的属性/对象列在API引用中
无论如何,对于Outlook,您需要访问Office.context.mailbox.diagnostics对象,并读取主机名和主机版本属性:什么是“Office.context.requirements”?它的回报是什么?它甚至没有作为Office.context:的属性/对象列在API引用中
无论如何,对于Outlook,您需要访问Office.context.mailbox.diagnostics对象,并读取主机名和主机版本属性:我们正在评估添加API以检测主机(“Excel、Word、Outlook等”)和平台(桌面、Mac、Web等)信息。为了确保我们考虑到这一点,您是否介意描述您面临的导致您寻求此API的特定用例?谢谢!我们正在评估添加API以检测主机(“Excel、Word、Outlook等”)和平台(桌面、Mac、Web等)信息。为了确保我们考虑到这一点,您是否介意描述您所面临的导致您寻求此API的特定用例?谢谢