如何在 Outlook 外部触发 Outlook 加载项

发布于 2024-09-13 04:09:02 字数 318 浏览 2 评论 0原文

我有一个向 Outlook 注册的 Outlook COM 加载项,用于捕获发送事件并检查邮件的内容。加载项检查内容以允许发送或拒绝发送。 COM 加载项是标准 VSTO 加载项。

我想围绕这个 COM 插件编写一个 C# 包装器,以允许其他进程使用此内容扫描。 我的包装器可以加载 COM 加载项,但我如何触发事件以便 COM 加载项触发?我实际上是否必须使用 Outlook Interop 程序集来启动 Send 事件才能触发 COM 加载项? 对于非 Outlook 的进程,我不需要发送内容,我要做的就是将内容传递到 COM 加载项。

有人可以指出我正确的方向或者这是否可能吗?

I have a Outlook COM add-in that is registered with Outlook to trap the Send event and examines the content of the message. The add-in examins the content to either allow it to be sent or reject the send. The COM Add-in is a standard VSTO add-in.

I would like to write a C# wrapper around this COM Add-in that will allow other processes to make use of this content scanning.
My wrapper can load the COM Add-in but how do i go about triggering the event so that the COM Add-in fires? Would i actually have to use the Outlook Interop assembly to initiate the Send event inorder for the COM add-in to trigger?
For the processes that are not Outlook i don't need to send the content, all i want to do is pass the content to the COM Add-in.

Can someone point me in the right direction or if this is even possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丘比特射中我 2024-09-20 04:09:02

您的 COM 加载项注册到 Outlook 引发的事件并包含事件处理程序。 COM 加载项不会引发发送或任何其他 Outlook 事件。因此,为了触发这些事件,您需要使用 Outlook 对象模型。
为此,您可以使用 Outlook API 编写应用程序。

your COM add-in registers to the event raised by Outlook and contains the event handlers. COM add-in doesn't raise the send or any other Outlook events. So in order to trigger these events, you need to make use of Outlook Object Model.
You can write an application using the Outlook APIs for this purpose.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文