如何按日期迭代 Outlook 收件箱? - Outlook OLE 自动化
我想迭代 Outlook Inbox,我使用 Ruby。
我在此处找到了一些有用的信息,但收件箱中消息的顺序不是按 RecevedTime(Item OLE 对象的属性)排序的。 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?
如何将收件箱中的邮件从最新到最旧进行迭代?
I'd like to iterate Outlook Inbox and I'm with Ruby.
I've found some useful info here, but the order of message in Inbox is not ordered by RecevedTime(Property for Item OLE object). GetLast method may find the latest message but GetPrevious method does not work as I expected.
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?
How can I iterate messages in Inbox from the latest to the oldest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)