Sorting

  • Thread starter Thread starter vortex2k4
  • Start date Start date
V

vortex2k4

I am trying to sort the messages in my inbox before working with them
in VBA.

I am using objInbox.Items.Sort "[Subject]"

No errors occur but when using objInbox.Items.Item(1).Display i still
get the first item sorted by time received rather than subject.

Any ideas?
 
You need to instantiate an explicit Items collection:

Set itms = objInbox.Items
itms.Sort "[Subject]"
itms.Item(1).Display

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top