相关疑难解决方法(0)

在处理C#Outlook之前按接收时间对电子邮件进行排序

在处理电子邮件并将数据输入数据库时​​,我需要按处理时间对收到的电子邮件进行排序.

我需要它,以便将要接收的最新电子邮件放入数据库以覆盖旧版本(如果有旧版本).

Microsoft.Office.Interop.Outlook.Items item =(Outlook.Items)source.Items;

Source是包含我想要排序的电子邮件的文件夹

我试过这四种方式:

            items.Sort("ReceivedTime", false);
            items.Sort("[ReceivedTime]", Outlook.OlSortOrder.olAscending);
            items.Sort("ReceivedTime", Outlook.OlSortOrder.olSortNone);
            items.Sort("[ReceivedTime]");
Run Code Online (Sandbox Code Playgroud)

这似乎没有把它排序为它仍然将最老的数据库放入数据库第二,覆盖最新的提交.

有任何想法吗?

c# sorting outlook date

4
推荐指数
2
解决办法
8798
查看次数

标签 统计

c# ×1

date ×1

outlook ×1

sorting ×1