1

I am creating an outlook add-in with the Javascript API, and the ribbon has a button defined as below...

<Item id="msgCheckHelp">
  <Label resid="checkHelpLabel"/>
  <Supertip>
    <Title resid="checkHelpTitle"/>
    <Description resid="checkHelpDesc"/>
  </Supertip>
  <Action xsi:type="ExecuteFunction">
    <FunctionName>checkHelp</FunctionName>
  </Action>
</Item>

and then, the check help function is as defined here below...

function checkHelp (event) {
    window.open("help", "_blank");
    event.completed();
}

The problem is, this is not recognized as a user event. I tried looking at displayDialogAsync as an alternative to window.open, but it only loads as a popup as well.

4

1 回答 1

1

如果您想在应用程序中显示您的帮助页面,您需要在清单中指定不同的Action类型,如下所示...

<Action xsi:type="ShowTaskpane">
    <SourceLocation resid="appHelp" />
</Action>

并在Resources部分指定资源 ID 的 URL,如下所示...

<bt:Urls>
    <bt:Url id="appHelp" DefaultValue="https://domain.../Help.html"/>
</bt:Urls>

现在,通过单击功能区按钮,任务痛苦将打开并显示您的帮助资源。

请注意:ActionExecuteFunction”提供了与FunctionFile 元素的连接,该元素旨在运行无需UI 交互的函数;您不能将其与window.open()功能一起使用。

于 2017-07-25T19:01:26.433 回答