捕获Outlook中的“移动”功能区栏选项 [英] Capturing the Move ribbon bar option in Outlook

查看:100
本文介绍了捕获Outlook中的“移动”功能区栏选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,Outlook是否会公开可以订阅的活动,以拦截用户点击
移动功能区栏选项?


我想确定目标文件夹并以与现有代码相同的方式处理邮件对象的移动,当用户将电子邮件从收件箱中拖放到TreeView中的另一个文件夹时。 / p>

我正在开发Outlook 2013,但希望任何解决方案适用于2007年以后的任何版本。


解决方案

Hello Renato,


您可以考虑重新调整功能区控件,请参阅
在Office Fluent功能区上临时重新调整用途命令
了解更多信息。


您还可以处理
BeforeItemMove
事件的文件夹类被触发当项目即将被移动或从文件夹中删除时,用户操作或程序代码的结果。以下是MSDN声明


当项目即将移动到另一个文件夹时,此事件将触发(包括"已删除邮件"文件夹)或项目即将被永久删除。在自动存档或同步操作期间不会触发。


如果操作是永久删除,   MoveTo   活动中返回的文件夹   <跨度>&NBSP; 没有 <跨度>&NBSP; in
Visual Basic)。


您也可以考虑使用
Explorer.BeforeItemCopy

Explorer.BeforeItemPaste
事件。


In short, does Outlook expose an event which can be subscribed to so as to intercept a user clicking the Move ribbon bar option?

I would like to ascertain the target folder and process the movement of the mail object in the same way as existing code does when the user drags and drops an email from, say, the Inbox to another folder in the TreeView.

I am developing with Outlook 2013 but would like any solution to be applicable to any version from 2007 onwards.

解决方案

Hello Renato,

You may consider repurposing Ribbon controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.

Also you can handle the BeforeItemMove event of the Folder class which is fired when an item is about to be moved or deleted from a folder, either as a result of user action or through program code. Here is what MSDN states:

This event fires when the item is about to be moved to another folder (including the Deleted Items folder) or when the item is about to be permanently deleted. It does not fire during auto-archiving or synchronizing operations.

If the action is a permanent delete, the MoveTo folder returned in the event will be Null (Nothing in Visual Basic).

Also you may consider using the Explorer.BeforeItemCopy and Explorer.BeforeItemPaste events.


这篇关于捕获Outlook中的“移动”功能区栏选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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