如何以编程方式知道安装了哪些Outlook加载项,以及是否启用了这些加载项? [英] How can I programatically tell what Outlook addins are installed, and if they are enabled or not?

查看:110
本文介绍了如何以编程方式知道安装了哪些Outlook加载项,以及是否启用了这些加载项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确定安装了哪些Outlook COM或PIA加载项以及是否启用了这些加载项.

How do I determine what Outlook COM or PIA addins are installed, and if they are enabled or not.

如何获取此信息以及希望的文件版本?

How can I get this information, and hopefully the file version as well?

推荐答案

(1)如果要从另一个Outlook加载项内部访问此信息,则可以使用Application.ComAddins对象(例如Count属性提供您安装的加载项数量).您可以遍历此集合,并检查单个COMAddin对象的LoadBehaviour属性到现在是否加载或禁用.

(1) If you want to access this information from inside another Outlook Add-in, you may use the the Application.ComAddins object (e.g. it's Count property gives you the number of add-ins installed). You can loop through this collection and check the LoadBehaviour property of the single COMAddin object to now if they're loading or if they're disabled.

(2)如果要从Outlook外部访问信息,则可以考虑阅读Software \ Microsoft \ Office \ Outlook \ Addins键下的相应注册表项.

(2) If you wand to access the information from outside of Outlook, you may consider to read the appropriate registry entries under the Software\Microsoft\Office\Outlook\Addins key.

(3)请注意,您根本不能信任此信息,因为可以为单个用户或所有用户安装Office加载项.因此,通过阅读上述(HKLM中的(a)和HKCU中的(b))键,您不能绝对访问已安装的加载项,而只能访问正在运行您的应用程序/您的程序的当前用户. Application.COMAddins对象向您显示两种信息融合在一起.

(3) Please be aware that you cannot trust this information at all, because Office add-ins can be installed either for a single user or for all users. So you cannot access the installed add-ins absolutely, but only for the current user running your app /your procedure, by reading the abovementioned key (a) under HKLM and (b) under HKCU. The Application.COMAddins object shows you both information blended in one.

(4)我不记得版本号在COMAddin对象或注册表中都可用.要访问该文件,您必须阅读注册表以找到该加载项的文件或程序集,并访问文件版本.请注意,用Visual Basic 6或其他语言编写的旧" COM加载项具有除VSTO加载项或基于Add-in Express工具的加载项之外的其他注册表项.

(4) I don't recall that a version number is available either in the COMAddin object or in the registry. To access that, you'll have to read the registry to find the file or assembly of the add-in, and access the file version. Please note that "old" COM Add-ins written in Visual Basic 6 or another language have other registry entries than VSTO add-ins or add-ins based on the Add-in Express tool.

这篇关于如何以编程方式知道安装了哪些Outlook加载项,以及是否启用了这些加载项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆