Outlook电子邮件主题仅在失去焦点后才更新 [英] Outlook email subject only updating after loosing focus

查看:104
本文介绍了Outlook电子邮件主题仅在失去焦点后才更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与Bryan在线程 Outlook 2007加载项-主题仅在失去焦点后才会更新 ...我正在使用vsto进行Outlook编程,我在撰写邮件窗口中使用Outlook功能区栏的按钮控件,该按钮从用于tfs的电子邮件,工作项将电子邮件的主题用作其标题字段.现在,当我更新电子邮件的主题并单击功能区栏上的按钮时,就会出现问题,因为工作项是使用主题的旧值创建的,因为功能区按钮单击对丢失主题焦点没有影响...我进行了很多搜索,但没有发现任何相关的问题..当功能区栏上的按钮单击时,是否有解决方案可以失去电子邮件主题"的焦点?

I have a same question as Bryan had in thread Outlook 2007 Add-In - subject only updates after losing focus ... I am using vsto for outlook programming, i am using button controls of outlook ribbon bar on a compose mail window, the button creates a work item from email for tfs, the work item uses subject of an email for its title field.. Now the problem occurs here when i update the subject of an email and clicks the button on Ribbon bar the work item is created with the old value of subject because ribbon button click does not have an effect on Subject focus lost ... I searched alot but found out nothing relevant .. Is there any solution to lost the focus of Email Subject when the button on the ribbon bar clicks??

推荐答案

尝试保存mailItem.有点像mailItem.Save()

Try to save mailItem. Smth like mailItem.Save()

如果您实际上不想这样做,则捕获mailitem.write事件,并将作为参考传递的布尔值取消设置为true.因此,将不会保存该项目,但应该更新主题.

If you actually do not want to, then catch mailitem.write event and set boolean cancel, which passed as a reference, to true. Therefore the item will not be saved but subject should be updated.

这篇关于Outlook电子邮件主题仅在失去焦点后才更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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