|
|
| Next: Advanced Search Behavior |
| Author |
Message |
Jim Conrady External

Since: Sep 17, 2006 Posts: 3
|
Posted: Wed Aug 01, 2007 2:46 pm Post subject: Outlook Sort Macro Archived from groups: microsoft>public>outlook>program_vba (more info?) |
|
|
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
--
--------------
Jim Conrady |
|
| Back to top |
|
 |
Michael Bauer [MVP - Outl External

Since: Aug 04, 2006 Posts: 594
|
Posted: Thu Aug 02, 2007 2:16 am Post subject: Re: Outlook Sort Macro [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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:
> 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 |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook] External

Since: Feb 11, 2005 Posts: 21627
|
Posted: Thu Aug 02, 2007 8:44 am Post subject: Re: Outlook Sort Macro [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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
"Michael Bauer [MVP - Outlook]" <mb.RemoveThis@mvps.org> wrote in message news:c2y6312kvrel$.k12ygqilnl5h$.dlg@40tude.net...
>
>
> 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:
>
>> 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 |
|
| Back to top |
|
 |
Michael Bauer [MVP - Outl External

Since: Aug 04, 2006 Posts: 594
|
Posted: Fri Aug 03, 2007 2:16 am Post subject: Re: Outlook Sort Macro [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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:
>
> Sub ShowViewA()
> Application.ActiveExplorer.CurrentView = "ViewA"
> End Sub |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|