Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / January 2006

Tip: Looking for answers? Try searching our database.

items.Sort ordered for more fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MClaudio - 02 Jan 2006 14:56 GMT
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
Ken Slovak - [MVP - Outlook] - 02 Jan 2006 15:26 GMT
Your code first sorts on "NumeroOrdine", then discards that sort to sort on
"AnnoOrdine". Outlook only allows sorting on one field at a time.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi,
>
[quoted text clipped - 12 lines]
>
> Thanks
MClaudio - 02 Jan 2006 16:50 GMT
This is a big problem !!!
How can i order more fields ?

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.
[quoted text clipped - 15 lines]
> >
> > Thanks
Ken Slovak - [MVP - Outlook] - 02 Jan 2006 20:35 GMT
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.
Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> This is a big problem !!!
> How can i order more fields ?
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.