items.Sort ordered for more fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I cannot sort items in my folder for more fields ?!?
Why ?

Set MyArchivio =
Application.GetNamespace("MAPI").Folders("CartellePubbliche").Folders("Tutte
le cartelle pubbliche")..Folders("Societa")

set MyItems=MyArchivio.Items
MyItems.Sort "NumeroOrdine"
MyItems.Sort "AnnoOrdine"

When i read Myitems with for Each the elements isn't ordered.

Thanks
 
Your code first sorts on "NumeroOrdine", then discards that sort to sort on
"AnnoOrdine". Outlook only allows sorting on one field at a time.
 
You'd have to abandon using the Outlook object model's Items.Sort method and
code your own multiple column sorting procedure, then pass the Items
collection to that user defined procedure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top