PDA

View Full Version : How to Write Outlook Macro to sort by Keyword and Sender?



vorlag
07-21-2013, 10:12 AM
I am brand new to Outlook macros, so I am hoping that someone can help me out here. I'd like to actually understand the so that I can eventually write other macros later.

Ok, so the problem is that I get hundreds of emails a week and my inbox has a ridiculously small mail limit. Seriously, if I go on vacation for 3 days, my inbox will be overfilled... It's that ridiculous.

I do have rules to sort my mail, but I can't exactly export the rules file and just manually copy and paste and edit since most of the rules are very similar. I'd like to instead have a macro do all of the sorting so that I can go in and edit it easily whenever I need to. I am comfortable with editing macros, so that's not a problem.

I want to sort my emails by subject and then by sender.


So, in the macro the senders would be grouped like this:

ABC Operations
> John Smith
> Jane Doe
> Millard Fillmore

ABC Technology
> Abby Arlington
> Bobby Baltimore

ABC Team
> Don Draper
> Pete Campbell


And then I'd want the folders grouped like this:

Projects
>Manhattan
>> Manhattan Operations
>> Manhattan Technology
>> Manhattan Team

Clients
> ABC
>>ABC Operations
>>ABC Technology
>>ABC Team

>XYZ
>>XYZ Operations
>>XYZ Technology
>>XYZ Team

So, I'd like for the macro to first look for keywords like "ABC" and "XYZ" and then look for the sender. The goal is for all emails to end up in the appropriate sub folder so that I can find it more easily.

Please let me know how I can do this!

Thank you!!