简体   繁体   English

从Outlook中的加载项调用自定义加载项

[英]Call a custom Add-In from my add-in in Outlook

I am developing an add-in for outlook. 我正在为Outlook开发外接程序。 When the user right click on a email or an attachment, my add-in will be seen in the context menu as an item. 当用户右键单击电子邮件或附件时,我的加载项将在上下文菜单中显示为项目。

My problem is, there is a custom add-in which has been developed by another person and some functions of this add-in are common with my add-in. 我的问题是,有一个由其他人开发的自定义加载项,并且该加载项的某些功能与我的加载项相同。 I do not want to write these functions again and basically I want to call this add-in from my add-in. 我不想再次编写这些函数,基本上我想从我的外接程序中调用此外接程序。 For example I will show a window and if user click ABC button, that add-in will be called (it has also a gui). 例如,我将显示一个窗口,如果用户单击ABC按钮,则将调用该加载项(它也带有gui)。

That can only work if the addin author explicitly exposes its functionality for the programmatic access. 仅当外接程序作者显式公开其功能以进行编程访问时,此方法才有效。 You could then retrieve the Addin object from the Application.COMAddIns collection and cast the Addin.Object property to some interface exposed by that addin. 然后,您可以从Application.COMAddIns集合中检索Addin对象,并将Addin.Object属性转换为该插件公开的某些接口。 Again, that can only happen if the addin actually wants to expose its functionality. 同样,只有当插件确实想要公开其功能时,才会发生这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM