如何从我的加载项(c#)获取消息发送日期时间 [英] How to get message sent date time from my add-in (c#)

查看:151
本文介绍了如何从我的加载项(c#)获取消息发送日期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅下面的屏幕截图。

See the screen shot below.

我收到了某人的消息。我正在尝试将此消息的已发送文本显示为"2010年3月13日星期一,5月13日下午5:33"。当我打开此消息时。

I have received a message from someone. I am trying to get this message's sent text which outlook 2010 shows as "Sent: Monday,March13,2017 5:33PM" when i open this message.

在同一表格中,它还会显示"您在2017年3月13日下午5:32回复此消息"但我对此并不感兴趣。

In the same form it also shows "You replied to this message on 3/13/2017 5:32 PM" but I am not interested in that.

从我的代码中我尝试了MailItem.sentOn属性,但它显示为"星期一,3月13,2017 5:32 PM"。

From my code I have tried the MailItem.sentOn property but it is showing as "Monday,March13,2017 5:32 PM".

我是否需要使用其他属性,在代码中如何获取outlook显示的日期时间值?

Do I need to use a different property, In code how do I get the date time value which outlook is displaying?

我无法附加截图在这里,我会尽快发布这个截图。

I am unable to attach a screenshot here, I will try to post a screenshot of this shortly.

谢谢,

Deepak。

推荐答案

Hello Deepak,

Hello Deepak,

尝试使用
ReceivedTime
属性r eturns a   日期  表示收到商品的日期和时间。  当您使用对象的  发送   方法,
传输提供商设置 
ReceivedTime       属性为

Try to use the ReceivedTime property which returns a Date indicating the date and time at which the item was received. When you send an item using the object's Send method, the transport provider sets the ReceivedTime and SentOn properties for you.

尝试使用任何低级属性资源管理器实用程序(如MFCMAPI或OutlookSpy)在运行时查看属性值。


这篇关于如何从我的加载项(c#)获取消息发送日期时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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