A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags:

Sorting





 
 
Thread Tools Display Modes
  #1  
Old July 19th 06, 01:45 PM posted to microsoft.public.outlook.program_vba
vortex2k4
external usenet poster
 
Posts: 9
Default Sorting

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?

Ads
  #2  
Old July 19th 06, 01:52 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Sorting

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"vortex2k4" wrote in message oups.com...
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?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook sorting rouble@gmail.com Outlook - General Queries 3 March 3rd 06 03:51 PM
Sorting Rules CJM Outlook - General Queries 2 February 18th 06 10:33 PM
Sorting doesn't work Peter Kim Outlook - Using Contacts 3 February 15th 06 05:31 PM
grouping and sorting Stuart Outlook - Using Contacts 2 February 9th 06 08:11 PM
grouping / sorting Stuart Outlook - Using Contacts 2 February 4th 06 12:43 PM


All times are GMT +1. The time now is 02:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Mobile Phones - Loans - Best Credit Cards - Dirty Dozen Brass Band - Aim Icons