Outlook 加载项:连接问题
我创建了一个 Outlook 加载项,并使用管理中心中的集成应用程序将其发布。我使用 Yeoman 创建了该加载项。应用程序状态正常并显示在相关用户的 Outlook 中,但在尝试执行其功能时收到以下错误消息:
对模糊表示歉意,尽管我的源图像很好,但我似乎无法修复该问题
我的 manifest.xml 文件中有以下行调用该函数:
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
并且我在该特定函数中有以下代码:
function action(event) {
const message = {
type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
message: "Web URL opened.",
icon: "Icon.80x80",
persistent: true,
};
// Show a notification message
window.open("https://myurl.com");
Office.context.mailbox.item.notificationMessages.replaceAsync("action", message);
// Be sure to indicate when the add-in command function is complete
event.completed();
}
function getGlobal() {
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: undefined;
}
const g = getGlobal();
// The add-in command functions need to be available in global scope
g.action = action;
有谁知道这里会出现什么问题吗?如何修复此问题以在单击按钮时执行重定向?
I created an Outlook add-in and posted it using Integrated Apps in the admin center. I created the add-in using Yeoman. The application status is OK and appears in the Outlook of relevant users, but I get the following error message when trying to execute it's function:
Apologies for the blur, I can't seem to fix that though my source image is fine
I have the following line in my manifest.xml file calling the function:
<Action xsi:type="ExecuteFunction">
<FunctionName>action</FunctionName>
</Action>
And I have the following code in that specific function:
function action(event) {
const message = {
type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,
message: "Web URL opened.",
icon: "Icon.80x80",
persistent: true,
};
// Show a notification message
window.open("https://myurl.com");
Office.context.mailbox.item.notificationMessages.replaceAsync("action", message);
// Be sure to indicate when the add-in command function is complete
event.completed();
}
function getGlobal() {
return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: undefined;
}
const g = getGlobal();
// The add-in command functions need to be available in global scope
g.action = action;
Does anyone know how what could be going wrong here? And how I can fix this to execute the redirect when the button is clicked?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论