在处理电子邮件并将数据输入数据库时,我需要按处理时间对收到的电子邮件进行排序.
我需要它,以便将要接收的最新电子邮件放入数据库以覆盖旧版本(如果有旧版本).
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]");
这似乎没有把它排序为它仍然将最老的数据库放入数据库第二,覆盖最新的提交.
有任何想法吗?