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: , , , , , ,

Move email messages to a specified folder based on a category





 
 
Thread Tools Display Modes
  #1  
Old January 27th 07, 03:02 AM posted to microsoft.public.outlook.program_vba
DougLost
external usenet poster
 
Posts: 1
Default Move email messages to a specified folder based on a category

Hi,

Instead of creating over 100+ rules to move messages to a specified
folder based on the category, I'm hoping a macro can do this. I have
over a 100 categories. Each category represents a project I'm working
on.

I have messages already assigned to a category in a file later folder.
I'd like any messages with category x automatically move from my file
alter folder to another folder named x. Messages with category y will
move to folder y. category z messages will move to folder z.


Am hoping somebody has already done this.

Thanks,

Doug

Ads
  #2  
Old January 30th 07, 09:51 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 817
Default Move email messages to a specified folder based on a category

This is easy enough to do with a macro. Just loop through the
MAPIFolder.Items collection for the given folder (use
ActiveExplorer.CurrentFolder to work with the currently selected folder) and
read the Item.Categories property, then call Item.Move(MAPIFolder) to move it
to a destination folder you have already retrieved.

The trick for your solution though is mapping Category names to specific
folders; you'll have to build your own name/value array or collection or
whatever and incorporate it into your processing logic.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"DougLost" wrote:

Hi,

Instead of creating over 100+ rules to move messages to a specified
folder based on the category, I'm hoping a macro can do this. I have
over a 100 categories. Each category represents a project I'm working
on.

I have messages already assigned to a category in a file later folder.
I'd like any messages with category x automatically move from my file
alter folder to another folder named x. Messages with category y will
move to folder y. category z messages will move to folder z.


Am hoping somebody has already done this.

Thanks,

Doug


 




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
Copy centain contacts to new folder based on category Bob Day Outlook - Using Contacts 0 July 24th 06 10:41 PM
How can set up a rule to I move emails from contacts in a given category... into a particular email folder? ship Outlook - General Queries 3 April 28th 06 12:28 AM
Move emails to a folder rule (Time based) George Lake Outlook - General Queries 1 April 27th 06 04:09 PM
Move mail to a folder based on 2 different words in the subject fi Alan Kirkham Outlook and VBA 2 February 14th 06 03:34 PM
Cannot move/delete messages from Sent folder KBAR Outlook Express 1 February 10th 06 04:49 PM


All times are GMT +1. The time now is 04:03 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.
Bad Credit Mortgages - Servidores dedicados - Internet Advertising - Ringtones - Credit Cards