Outlook对象模型-链接到会话清除功能 [英] Outlook Object Model - Hooking to the Conversation Cleanup Feature

查看:93
本文介绍了Outlook对象模型-链接到会话清除功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Outlook 2010具有称为 会话标题 Outlook对象模型实现的.

Outlook 2010 has a feature called Convesation Cleanup. This feature is implemented using the Conversation Header Outlook Object Model.

我想挂接到此调用并在触发时执行操作,但是我不知道如何接听/挂接它.有人知道这是否可能吗?如果不是,您是否知道有任何解决方法?我尝试使用Outlook间谍在没有运气的情况下执行会话清理"(没有记录任何内容)时查看事件日志...无论如何,还是要查看Outlook事件的更深层次的跟踪记录?

I would like to hook to this call and perform an action when triggered, yet I can't figure out how to catch it/hook on to it. Is anyone aware if this is possible? If its not, are you aware of any way around it? I have tried using outlook spy to view the event log when executing 'conversation cleanup' with no luck (nothing logged)... is there anyway of viewing deeper tracing of outlook events?

推荐答案

事实证明非常简单.第一步是获取要覆盖的所需按钮的idMso.微软提供 Office套件的所有控件ID的列表,但是我发现了更快,更用户友好的获取idMso的方法.

It turns out to be quite simple. The initial step is to obtain the idMso of the desired button to override. Microsoft provides a list of all the control ids for the Office suite however I found faster and more user friendly way of obtaining the idMso.

  • Office按钮/文件->选项->自定义功能区->将鼠标悬停在 所需命令-idMso显示在括号中
  • Office Button/File -> Options -> Customize Ribbon -> Hover mouse on desired command - idMso is displayed in brackets

一旦有了所需的ID,就可以通过添加一组命令来覆盖Ribbon.xml的onAction/Enable设置来编辑Ribbon.xml.请参阅下面的示例;

Once we have the desired ids, we edit the Ribbon.xml by adding a set of commands to override the onAction/Enable settings of the button. See example bellow;

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <commands>
    <command idMso="IgnoreConversation" onAction ="FooRoutine" enabled="true"/>
  </commands>
  <ribbon>
  </ribbon>
</customUI>

最后,我们在Ribbon.vb上创建所需的功能,一旦按下按钮,该功能便会执行.

Last, we create the desired function on the Ribbon.vb which will be executed once the button is pressed.

我强烈建议您观看8分钟的 MSDN视频上面的步骤已经很好地解释了.

I strongly suggest that you watch the 8 minute MSDN video where the steps above have been very well explained.

这篇关于Outlook对象模型-链接到会话清除功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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