Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting an Outlook folder?? Ack!!
Message
From
31/12/2002 06:43:03
 
 
To
31/12/2002 00:13:07
Scott Barker
Barker Systems Consulting Ltd.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00736859
Message ID:
00736886
Views:
11
Hi Scott.

I'm trying to figure out how to sort the crazy Outlook inbox by ReceivedTime ...

What are you seeing when you use this sort? I suspect that it is actually working because when you retrieve the items in the inbox, by default, they are sorted by ReceivedTime with the oldest message first. Did you try sorting them descending? This works for me:
oOutlook = CREATEOBJECT( 'Outlook.Application' )
oNameSpace = oOutlook.GetNamespace( 'MAPI' )
oInbox = oNameSpace.GetDefaultFolder( 6 )
oMessages = oInbox.Items
oMsg = oMessages.Item( 1 )
?oMsg.SenderName
oMessages.Sort( "[SenderName]" )
oMsg = oMessages.Item( 1 )
?oMsg.SenderName
oMessages.Sort( "[ReceivedTime]", .T. )
oMsg = oMessages.Item( 1 )
?oMsg.SenderName
?oMsg.body
Previous
Reply
Map
View

Click here to load this message in the networking platform