Consulting

Results 1 to 2 of 2

Thread: Sort an outlook selection

  1. #1

    Sort an outlook selection

    Hi guys, i'm hoping for a wee bit of help here.

    I've created a macro that takes the information from an e-mail and registers it an excel sheet, and then moves the e-mail from the inbox to a "registered folder".
    This is also done if there's multiple e-mails selected, since the way i access the e-mails is via Application.ActiveExplorer.Selection , however i run into a bit of a problem.

    When there's multiple e-mails selected it registers them in the sort order of the inbox. How i'd like to have them sorted is always via received time, so the oldest gets registered first, regardless if the user is sorting on subject or whatever.

    Anyone who has an idea how the selection can be sorted?

  2. #2
    VBAX Tutor Mavyak's Avatar
    Joined
    Jul 2008
    Posts
    204
    Location
    You could create an ADODB.Recordset and write all the email info to that. Then you could sort it and use the CopyFromRecordset method of the Range object in Excel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •