0
我想迭代Outlook收件箱,我与Ruby。如何迭代Outlook收件箱的日期? - Outlook OLE自动化
我发现一些有用的信息here,但收件箱中的邮件顺序不是按照RecevedTime(Item for OLE object的属性)排序的。 GetLast方法可能会找到最新的消息,但GetPrevious方法不能像我期望的那样工作。
require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')
mapi = outlook.GetNameSpace('MAPI')
inbox = mapi.GetDefaultFolder(6)
inbox.Items.GetLast # return the latest message, maybe
inbox.Items.GetPrevious # return nil object and then, what's this method for?
inbox.Items.Sort('ReceivedTime') # is this right usage? if so, what's next?
如何在Inbox中将邮件从最新到最旧?