Outlook Sort Macro

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

Guest

Folks, I have searched many of the MSDN forums as well as a few Google
searches, and cannot come up with an easy way to do this, so let me ask the
experts.

I deal with a lot of email every day. Sometimes I need to see the emails
sorted by date, sometimes by who they are from, and sometimes by Subject. I
know I can take my hands off the keyboard, right click the mouse on the
header bar, then pick date, from, subject... Being the old school hands on
the keyboard guy I am, my preference is to come up with 3 macros that I can
assign to hot keys. This is the kind of thing that is a piece of cake in
Excel with the macro recorder, but I am having a giggle figuring out where to
start on Outlook.

I have slightly more than entry-level knowledge of Excel VBA... Looking for
a sample, or a pointer to some doc that may help me out.

I'd appreciate the help!

Jim
 
You might start with the Object Browser (f2), which is very helpful. Switch
from <All Libraries> to Outlook and type in 'sort'. It lists one Sort method
for the Items collection. Select that and click f1 for a sample.

Via Toolbars/Customize you can create one button for each macro. Name each
button with a '&' before the character that should be used as the 'hotkey'.
That works if you find characters that aren't being used already.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 1 Aug 2007 14:46:09 -0700 schrieb Jim Conrady:
 
Unfortunately, sorting the Items collection programmatically doesn't affect the screen display.

The way I'd approach this is to create a new table view for each sort. Then each macro should be as simple as:

Sub ShowViewA()
Application.ActiveExplorer.CurrentView = "ViewA"
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
You're right, of course :)

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Thu, 2 Aug 2007 08:44:12 -0400 schrieb Sue Mosher [MVP-Outlook]:
Unfortunately, sorting the Items collection programmatically doesn't affect the screen display.

The way I'd approach this is to create a new table view for each sort.
Then each macro should be as simple as:
 
Back
Top