如何还原AppointmentItem的更改状态 [英] How to revert changed state of AppointmentItem

查看:88
本文介绍了如何还原AppointmentItem的更改状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

在我的Outlook加载项中,我更改了 AppiontmentItem 的一些属性,表示添加或更改用户属性和
保存属性更改。我还订阅了 Write 事件,在某些情况下我已经取消了
保存。但是,如文档中所述( 错误  当
事件发生时。如果事件过程将此参数设置为 
True
保存操作未完成
)它仅取消
保存操作但未提交的属性状态仍然存在且想要保存哟我们关闭Outlook时会出现更改?对话框。

In my Outlook add-in I've changed some property of AppiontmentItem, says add or change an user property and Save property changes. I've also subscribed to Write event and in some situation I've canceled the Save. But, as mentioned in documentation (False when the event occurs. If the event procedure sets this argument to True, the save operation is not completed) it cancels only Save operation but uncommitted state of property remains and Want to save your changes? dialog box appears when we close Outlook.

是否有可能避免这种情况,理想情况下重置属性已更改(未保存)状态。我试图将属性值设置为初始值而没有运气。

Is there any possibility to avoid this situation, ideally to reset the property changed (unsaved) state. I've tried to set property value to its initial value without luck.

推荐答案

不,一次一个项被修改,只有Save会将Modifield属性重置为false。

No, once an item is modified, only Save will reset the Modifield property to false.

您可以尝试使用MailItem.Close(olDiscard),然后使用Namespace.GetItemfromID重新打开该项,但我不知道我认为这在所有情况下都是实用的。

You can try to use MailItem.Close(olDiscard) and then reopen the item using Namespace.GetItemfromID, but I don't think this will be practical in all cases.


这篇关于如何还原AppointmentItem的更改状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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