拦截源和目标之间的 Move Item 函数
我已经成功地捕获了 ItemMove 函数(主要是)使用 Redemption 库所需的方式。我的下一个任务可能是不可能的,但除非我问,否则我不会知道。
我正在编写的部分内容涉及将邮件从 Exchange 收件箱移动到 PST 并可能删除附件。这样做是因为我们的网络抖动在 DFSR 上的 PST 复制方面受到了严重打击(是的,我知道 PST/网络问题和 MS 建议,但是当您不这样做时,请尝试向用户解释这一点)没有钱用于培训或新的归档软件)。我希望能够通过代码执行以下操作:
1)用户选择消息并将其拖动到 PST 文件夹 2) 插件拦截此消息,将消息复制到本地驱动器上的临时 PST 3) 附件在本地 PST 中处理并保存到适当的网络目标 4) 消息被移至网络上的真实目标 PST。
这个多步骤过程是必要的,因为我们对驱动器空间和最大 PST 文件大小都有配额。由于 PST 压缩不会自动发生,并且我们无法以编程方式强制执行它,因此我提出了这个解决方法的想法。
像往常一样欢迎想法和灵感。
-拉里
I've successfully captured the ItemMove function the way I need to (mostly) using the Redemption libraries. My next task may be impossible, but I won't know unless I ask.
Part of what I'm writing involves moving messages from the Exchange inbox to a PST and potentially removing the attachment. This is being done because our network thrashing is taking a big hit in regards to PST replication over DFSR (yes, I 'm aware of the PST/network issues and MS recommendations, but you go try explaining that to the users when you don't have money for training or new archiving software). I'd like to be able to do the following via code:
1) User selects message(s) and drags them to a PST folder
2) Add-in intercepts this, copies the messages to a temporary PST on a local drive
3) Attachments are processed in the local PST and saved to their appropriate network destination
4) Messages are moved into the true destination PST on the network.
This multi-step process is necessary as we have quotas on both drive space as well as maximum PST file size. Since PST compression doesn't happen automatically and we can't programmatically force it, I've come up with this idea for a workaround.
Ideas and inspiration are welcome as usual.
-Larry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法拦截 Outlook 中的任何拖/放事件,至少不能使用任何官方支持的 API。
您将在目标文件夹上收到 ItemAdd 事件,但它仅在创建并保存项目后才会触发。
You cannot intercept any drag/drop events in Outlook, at least not using any of the officieally supported APIs.
You will get ItemAdd event on the target folder, but it will only fire after the item was created and saved.