MailItem第一次修改时间
我想捕获电子邮件在创建后进行了首次修改的日期和时间(例如添加了类别标记)。是否可以添加FirstModificationTime
属性到MailItem object
- 类似于现有的LastModificationTime
?怎么做?任何帮助将不胜感激。MailItem第一次修改时间
您可以添加一个用户属性。
With FieldChooser |用户定义的字段,您可以手动创建用户定义的字段FirstModificationTime,或者一旦您运行此字段,您可以将自动创建的字段添加到文件夹视图。
Sub UserProp_FirstModificationTime()
Dim myItem As mailitem
Dim myUserProperty As UserProperty
Set myItem = ActiveExplorer.Selection.Item(1)
Set myUserProperty = myItem.UserProperties.Add("FirstModificationTime", olText)
' If you use a trigger event for this it will update once only.
If myUserProperty.Value = "" Then
myUserProperty.Value = Now
myItem.SAVE
End If
End Sub
那将是MailItem.CreationTime
。
这就是创作时间。我的意思是,我想捕捉第一次修改收到的电子邮件的时间。例如,我收到一封电子邮件并用颜色分类标记它。标记时间将是第一次修改时间。 –
没有这样的事情 - 第一个修改是创建电子邮件。最后一次修改是LastModificationTime。基础消息存储不知道谁在修改电子邮件或者为什么 - 因为POP3提供商刚刚下载了电子邮件?还是因为最终用户设置了一个类别?该店不知道,也不在乎。 –
谢谢!完美的作品! –