我有一个简单的插件,添加了行组成电子邮件主体,它工作完美的Office 365网页版本,但不工作在outlook桌面或我的live.com与我的hotmail帐户,
<DesktopFormFactor>
<ExtensionPoint xsi:type="LaunchEvent">
<LaunchEvents>
<LaunchEvent Type="OnNewMessageCompose" FunctionName="checkSignature" />
</LaunchEvents>
<SourceLocation resid="https://localhost:3000/autorunshared.js" />
</ExtensionPoint>
</DesktopFormFactor>
在这里,js,
function checkSignature(event: Office.AddinCommands.Event) {
console.log('--------------------checkSignature ',event);
}
发布于 2022-06-05 21:27:59
resid
元素的SourceLocation
属性的值应该是一个ID,而不是完整的URL路径。请参阅下面的代码片段:
<!-- Event-based activation happens in a lightweight runtime.-->
<Runtimes>
<!--
HTML file including reference to or inline JavaScript event handlers.
This is used by Outlook on the web and Outlook on the new Mac UI preview.
-->
<Runtime resid="WebViewRuntime.Url">
<!--
JavaScript file containing event handlers. This is used by Outlook Desktop.
-->
<Override type="javascript" resid="JSRuntime.Url"/>
</Runtime>
</Runtimes>
....
....
....
<ExtensionPoint xsi:type="LaunchEvent">
<LaunchEvents>
<LaunchEvent Type="OnNewMessageCompose" FunctionName="checkSignature" />
</LaunchEvents>
<SourceLocation resid="WebViewRuntime.Url" />
</ExtensionPoint>
....
....
....
<bt:Urls>
<!-- Entry needed for Outlook on the Web / new Mac UI preview. -->
<bt:Url id="WebViewRuntime.Url" DefaultValue="https://localhost:3000/autorun.html" />
<!-- Entry needed for Outlook Desktop. -->
<bt:Url id="JSRuntime.Url" DefaultValue="https://localhost:3000/autorunshared.js" />
</bt:Urls>
这里有更多信息:https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch
当您使用完整的URL作为SourceLocation
的值时,您所看到的行为,即网络上的Outlook正在以某种方式工作,这听起来像是一个潜在的错误。我将把它传递给Outlook Web团队。
发布于 2022-05-26 05:55:17
Outlook web外接程序仅适用于Exchange帐户。通常,在Outlook的桌面版本中每个邮箱都安装外接程序。
如果需要使用IMAP或其他非exchange帐户支持Outlook桌面中的多个帐户,则可以考虑创建COM外接程序。有关详细信息,请参阅演练:为Outlook创建第一个VSTO外接程序。
https://stackoverflow.com/questions/72392706
复制